Re: Using NuttX with custom bootloader

2021-04-22 Thread Sebastien Lorquet
Sorry, forgot to say that of course, VTOR is updated by the bootloader prior to jumping into the OS. BOOTCODE __attribute__((naked, noreturn)) void __boot_app(void)   {     __asm__ __volatile__ ("\t"     /* load SP (from 08004000) */     "movw r0, #0x4000  \n\t"     "mo

Re: Using NuttX with custom bootloader

2021-04-22 Thread Sebastien Lorquet
Hello I did that and it works in a consumer product with a stm32 since, well, 2018 I think. Also in an open source product. my board uses a custom linker script that locates the start of the flash a bit farther than the usual start (one stm32 block or 16k IIRC) . Then I compile nuttx as usua

Re: Using NuttX with custom bootloader

2021-04-21 Thread Flavio Castro Alves Filho
It worked. Just changing the linker script was enough. Thank you very much. Best regards, Flavio Em qua., 21 de abr. de 2021 às 16:00, Gregory Nutt escreveu: > > > > But I don't know if there is anything to be done directly in NuttX source > > code. > > Nothing other than setting the VBAR re

Re: Using NuttX with custom bootloader

2021-04-21 Thread Gregory Nutt
But I don't know if there is anything to be done directly in NuttX source code. Nothing other than setting the VBAR register (called NVIC_VECTAB in NuttX).  This is already done so I guess the real answer is No.