Author Topic: STM32: GCC linker script changing from STM32F100 to STM32F103  (Read 1122 times)

0 Members and 1 Guest are viewing this topic.

Offline rhodgesTopic starter

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
I am getting into STM32 land now :)

I have installed my ARM tools and I have built a demo program, looked at the startup and main code, and am looking forward to working with it.

The example code is from Dr. Geoffrey Brown and it has a linker script for the STM32F100 (128K Flash, 8K RAM). I have two boards witth STM32F103C8 (64K Flash, 20K RAM).

I copied his script and changed the memory section to:
Code: [Select]
MEMORY
{
  RAM (rwx)  : ORIGIN = 0x20000000, LENGTH = 20K
  FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
}
Is this all I need to change? Thanks!
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: STM32: GCC linker script changing from STM32F100 to STM32F103
« Reply #1 on: March 16, 2019, 09:22:10 pm »
That depends on what else is in the linker script. Attach the complete file.
Alex
 

Offline rhodgesTopic starter

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: STM32: GCC linker script changing from STM32F100 to STM32F103
« Reply #2 on: March 16, 2019, 09:43:50 pm »
Okay, here is the whole thing. (If the attachment doesn't work, I will cut and paste it in.)
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: STM32: GCC linker script changing from STM32F100 to STM32F103
« Reply #3 on: March 16, 2019, 09:46:52 pm »
This is a well written linker script. Those changes should be sufficient.

I like the idea with stack size checker. I will borrow that for my scripts.
Alex
 
The following users thanked this post: rhodges


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf