Page 1 of 1

Porting ChibiOS to a Board with Bootloader

Posted: Sun Oct 23, 2011 9:16 pm
by clausi
Hi all,
first thanks for your great work on ChibiOS...I love it

However I've got a STM32F103 based board that has a bootloader between 0x8000000 and 0x8004000. I modified the ch.ld file to start the flash at 0x8004000 and wrote the board.h/board.c to meet my hardware layout.
On startup the main() is called but it seems that the sheduler does not start so the system stops at the first chThdSleepMilliseconds(...). Did I missed something to port for this special bootloader setup?

Cheers
Clausi

Re: Porting ChibiOS to a Board with Bootloader

Posted: Sun Oct 23, 2011 9:23 pm
by Giovanni
Hi,

The default startup file makes some initializations to the core, the kernel expects the main() to be invoked under the following conditions:
- Dual stack mode.
- Stacks initialized in the correct position defined by the ld file.
- Supervisor mode.
- Interrupts disabled.

See crt0.c for details.

Giovanni