STM32F103 linker files

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
a.giacomolli
Posts: 3
Joined: Wed Aug 29, 2012 7:21 pm

STM32F103 linker files

Post by a.giacomolli »

Hi

We're using STM32F103RCT6 in a project with ChibiOS. It is a high density device and uses STM32F103xC.ld linker script. This file is not provided with ChibiOS, so I would like to know which files I need to change in order to provide support to our hardware.

I started creating linker script with memory regions (256 kB flash; 48 kB SRAM) and changing stm32_registry.h to verify STM32F103xC macro definition. This define maps the device with STM32F10X_HD macro, enabling hardware peripherals in ChibiOS. However, the number of GPIOs in configuration file are not consistent with this device, that has only PA, PB and PC. So, how can I extend this file to support the device?

Anderson
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F103 linker files

Post by Giovanni »

Hi,

You just need to create the .ld file using the simple template. The registry entries only consider the largest package for any given subfamily, smaller packages only bring out less signals but the ports are still in silicon and may need initialization (put them all as input-pullup in board files).

In case the port is not physically in silicon then you would get an exception while trying to initialize the non-existing port but this should not be the case from past experience.

Giovanni
a.giacomolli
Posts: 3
Joined: Wed Aug 29, 2012 7:21 pm

Re: STM32F103 linker files

Post by a.giacomolli »

Hi

Fast reply :)

Thanks, Giovanni. It worked at first.

Anderson
Post Reply