Search found 10 matches

by doddi
Fri Dec 09, 2016 11:39 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

It turns out it is something to do with gcc 4.9.
Although it compiles there doesnt seem to be a strcmp available and it is this that is causing the unhandled_exception. It is probably an issue with the rules.ld file that I am using as part of the ChibiOS I was given for this project.

I dont have ...
by doddi
Fri Dec 09, 2016 7:51 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

I have now tried with gcc 4.9 and 5.2 with the same problem. All works fine if I have bootloader and app programmed but not when I erase bootloader

you need bootloader programmed underneath

i'm using 4.9

Thanks for the input, I think I have been chasing my tail with another issue in that case ...
by doddi
Fri Dec 09, 2016 7:35 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

I have now tried with gcc 4.9 and 5.2 with the same problem. All works fine if I have bootloader and app programmed but not when I erase bootloader

I suspect this is how it is but most people wouldn't have realised, presumably openOCD will only erase what it is about to programme, whereas I have ...
by doddi
Fri Dec 09, 2016 7:21 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

Hmm, thats what I thought you should be able to do. Have you done this by first doing a complete erase of your flash device (i.e. no bootloader or 'original' vector table)

Im running on a linux machine using openOCD and eclipse with the plugin

Im wondering if it might be something to with my arm ...
by doddi
Fri Dec 09, 2016 7:01 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

Here is what i did

application
#define CORTEX_VTOR_INIT 0x8400
.ld file is set flash : org = 0x08008400, len = 128k

bootloader
all default

and to jump to the application where APP_START_ADDR = 0x8008400


/* reset interrupts default */
chSysDisable();

/* Clear pending interrupts */
SCB ...
by doddi
Thu Dec 08, 2016 8:58 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

Hi,

Further to the information above I have noticed that there is some kind of stack issue. See screenshots attached, first SysTick_Handler.jpg then as part of OSAL_IRQ_PROLOGUE there is _stats_increase_irq (attached) which the stack looks fine but then when _dbg_check_enter_isr (attached) is ...
by doddi
Thu Dec 08, 2016 8:22 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

Hi,

Sorry for the delay I have not been working on this for a few days.

I have debugged this a little further and I have made it as simple as possible. My main function is as folllows:


int main(void) {
halInit();
chSysInit();

chRegSetThreadName("Tick Timer");
while(true ...
by doddi
Sun Dec 04, 2016 4:06 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

If VTOR initialisation you mean
SCB->VTOR = CORTEX_VTOR_INIT
then this is being done by both the bootloader and application when they start ( I havnt actually checked the bootloader) but they are both initialising the ChibiOS. Bootloader CORTEX_VTOR_INIT is set to 0x00000000 and app is set to ...
by doddi
Sun Dec 04, 2016 3:06 pm
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Re: Bootloader vector table problem

Hi,

It is ChibiOs 3 (I believe but it has been handed over from another developer). I have also tried it on a fresh download of 16.1.5 with the same symptom.

The device is stm32f103g

Thanks
by doddi
Sun Dec 04, 2016 11:58 am
Forum: STM32 Support
Topic: Bootloader vector table problem
Replies: 15
Views: 7185

Bootloader vector table problem

Hi All,

I am fairly new to ChibiOS and I am having trouble implementing the use of a bootloader, my specifically how the vector table is working.

My Bootloader sits at 0x08000000 and my app sits at 0x0800C000. If I flash the bootloader and the application it seems to work fine, i.e. it will jump ...