This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I'm using the enet_s2e example and I'm able to build and run it. However, when I change the APP_BASE, it stops working. When debugging it and pausing the execution, the disassembly opens with the message "No source available for "0xfffffffe"". When the APP_BASE is 0, the application works just fine. Shouldn't I be able to change the APP_BASE to something else? I can change other examples APP_BASE without any issue.
Thanks.
When the value of APP_BASE is changed, the interrupt vector table is moved from the default memory location (that is 0x0) to this new changed location.
The register VTABLE has to be updated to this location, so that NVIC can branch to the correct interrupt handlers on an interrupt. Also the SP and PC should be loaded with the values at (APP_BASE) and (APP_BASE + 4) locations respectively. This is typically done by the bootloader, which sits at the default location and updates the SP, PC and VTABLE values to run the application at APP_BASE.
Some IDEs like CCS automatically load the correct SP and PC values, when run in debug mode. Hence the applications that don't use interrupts might work, but the applications that use interrupts will fault. Most likely this is the issue you are noticing.
Is there a reason you are changing the APP_BASE without using a bootloader?
Sai
Sai,
Thanks, that was it. it was the VTABLE that was missing since the enet_s2e uses interrupt whereas the other examples I tried did not. We will be using a bootloader but I just wanted to test out the enet_s2e to make sure that it would work at a different location than 0.
Thanks.
Sai,
I actually have a follow up question and hope you can help with it. So we're building a custom bootloader. It's still in the beginning stages but we were testing the jump to the application but it doesn't appear to work. What we did was program the TM4C129X with one of the example programs at address 0x10000 and we have our customer bootloader at address 0. When we program an example without interrupts, the jump works perfectly fine. However, if we program an example with interrutps, the jump doesn't work. I'm guessing this has something to do with what you mentioned above with regards to the VTABLE. We tried a couple of ways to setting the VTABLE, one right before we jump to the application and the second where we modified the application to set it right at the beginning. However, it's not working. So is there something else that I need to do on the bootloader to in order to successfully jump to the application.
Here's the inline assembly code we're using to perform the jump to the application code:
__asm(" movd r0, #65536 \n"
" ldr r1, [r0] \n"
" mov sp, r1");
__asm(" ldr r1, [r0, #4]\n"
" mov pc, r1");
Thanks.