Jump to User Program - not working on ChibiOs

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

Moderator: RoccoMarco

Post Reply
enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

Jump to User Program - not working on ChibiOs

Post by enly1 »

Hi All,

I'm 100% new to embedded microcontrollers, so please be gentle.

I've setup a toolchain, modified a board file, compiled a simple blinky application which toggles 2 leds every 1/2 second and flashed it to a chinese ebay hy-stm32_100p board.

This was done using the STM Flash Loader Demo - which appears to be about the only flasher that seems to work.

As boot settings are on jumpers on the board and i'm programming over UART, manually swapping the jumper is a nightmare. So I tried using the 'jump to user program' option on the flasher. For ChibiOS code, it doesn't appear to run unless you reset the boot jumpers and reset the board.

For other demo samples from outside of ChibiOs, the code executes automatically and all is good.

So - any ideas ?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Jump to User Program - not working on ChibiOs

Post by Giovanni »

Hi,

ChibiOS expects to be invoked after the reset and initializes the HW, it is possible that this "jump to user program" options does not leave the MCU in a post-reset state and something goes wrong during initialization.

I recommend you get some cheap JTAG or an STLink. A discovery board would also be a good option.

Giovanni
enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

Re: Jump to User Program - not working on ChibiOs

Post by enly1 »

Thanks - that was all I could think of as a full reset works fine.

So off to the JTAG route - while the serial bootloader is fine for some stuff, its not an optimal development option given my high probability for recompiles.

I assume through JTAG, I can just force a board reset from my IDE or whatever tool I'm using it.

The board I have has the 20 min JTAG header available, so will probably stick with the board. May end up on some non STM32 if I start looking at buying another board thats all. Its not really about the learning of the micro that interests me for a change, but the ability to build something I have in mind.

Thanks for the heads up.

Simon
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Jump to User Program - not working on ChibiOs

Post by Giovanni »

Hi,

I suggest to get an STM32F3-Discovery, it is dirty cheap and it includes the debugger (STLink v2), you can also use it as debugger for another STM32.

Giovanni
enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

Re: Jump to User Program - not working on ChibiOs

Post by enly1 »

You have no idea how good an idea that suggestion works out to be - I'm after building a datalogger to hook up to bluetooth phone and the onboard gyro from that dev board is perfect - and when you said cheap, didn't realise how cheap.

One on order shortly.

Thanks again ...
Post Reply