Hello,
I have an LPC2148 board that comes preloaded with the SFE bootloader.
I can compile, burn and run applications using this bootloader (using the demo projects provided by sparkfun). However it seems I am unable to get interrupts to work properly.
More precisely, I have been trying to get freeRTOS running with the bootloader. My application is properly called and initialized by the bootloader, but the board crashes as soon as interrupts are enabled (I believe).
What needs to be done to get your application to work with the bootloader? I’ve already changed the linker to relocate the code to offset 0x10000 and this works.
How about other mods? How about the interrupt vectors?
Any help would be appreciated!
Hi there, is your board the DEV-00555? Have you tried any simple interrupt-driven code to see if that works before jumping into the full-up RTOS?
Disclaimer: I haven’t tried using interrupts with the SFE bootloader, I’ll ask around and give it a shot myself when I have a chance. But as a quick answer, bootloaders tend to not play nicely with interrupts in general. They’re usually located where the interrupt vectors live (preventing your routines from living there), and may or may not provide hooks for you to get interrupts working properly (which can also require modifications to the code you’re trying to get running; just relocating everything may not be enough).
The for-sure solution would be to abandon the bootloader and program your code directly into the MPU using the JTAG port. This way you know for sure that you’re getting the “whole” processor, everything is located where it’s supposed to be, and no other software is lurking around in the background potentially causing problems.
The harder solution is to dig into the bootloader source to see what tricks you might need to do to get interrupts working correctly. Or wait for someone else here to pipe up and tell you how to do it (or contradict all of the above.
Hope this helps a little, do try something simple with interrupts and see if you can get that working. Let us know how it goes!
Hey thanks for the reply. I had forgotten about this post. Since then I’ve figured out the issue, I’m currently running freeRTOS on the logomatic board. It was a matter of rerouting the interrupts and properly initializing the exception vector table.
SFE-TS-Mike:
Hi there, is your board the DEV-00555? Have you tried any simple interrupt-driven code to see if that works before jumping into the full-up RTOS?
Disclaimer: I haven’t tried using interrupts with the SFE bootloader, I’ll ask around and give it a shot myself when I have a chance. But as a quick answer, bootloaders tend to not play nicely with interrupts in general. They’re usually located where the interrupt vectors live (preventing your routines from living there), and may or may not provide hooks for you to get interrupts working properly (which can also require modifications to the code you’re trying to get running; just relocating everything may not be enough).
The for-sure solution would be to abandon the bootloader and program your code directly into the MPU using the JTAG port. This way you know for sure that you’re getting the “whole” processor, everything is located where it’s supposed to be, and no other software is lurking around in the background potentially causing problems.
The harder solution is to dig into the bootloader source to see what tricks you might need to do to get interrupts working correctly. Or wait for someone else here to pipe up and tell you how to do it (or contradict all of the above.
Hope this helps a little, do try something simple with interrupts and see if you can get that working. Let us know how it goes!
Awesome! Glad you got everything working (and sorry about us taking so long to reply, I only noticed the date of your post after I responded to it).
I know this is a few months later than the original post, but I was wondering if you could expand/explain further how you got FreeRTOS working with the bootloader, as I am currently having similar issues with the same port (onto my own LPC2148 board but still running a similar bootloader). Thanks!
Heythere, I’ve started a thread pointing to my blog that explains how to do it.
SFE thread: viewtopic.php?f=14&t=23030&p=106375&hil … os#p106375
My blog’s entry: http://sites.google.com/site/logodynami … tingsystem
Let me know when you get it to work on your board
finger563:
I know this is a few months later than the original post, but I was wondering if you could expand/explain further how you got FreeRTOS working with the bootloader, as I am currently having similar issues with the same port (onto my own LPC2148 board but still running a similar bootloader). Thanks!
Thanks! I’ll look over your blog; I’m sure it will be of great help to me!
jstoezel:
Heythere, I’ve started a thread pointing to my blog that explains how to do it.
SFE thread: viewtopic.php?f=14&t=23030&p=106375&hil … os#p106375
My blog’s entry: http://sites.google.com/site/logodynami … tingsystem
Let me know when you get it to work on your board
finger563:
I know this is a few months later than the original post, but I was wondering if you could expand/explain further how you got FreeRTOS working with the bootloader, as I am currently having similar issues with the same port (onto my own LPC2148 board but still running a similar bootloader). Thanks!
Also, do you still need an activation key from Rowley? I have a fully activated CrossStudio 2.0 if that is still of any use to you.
jstoezel:
Heythere, I’ve started a thread pointing to my blog that explains how to do it.
SFE thread: viewtopic.php?f=14&t=23030&p=106375&hil … os#p106375
My blog’s entry: http://sites.google.com/site/logodynami … tingsystem
Let me know when you get it to work on your board
finger563:
I know this is a few months later than the original post, but I was wondering if you could expand/explain further how you got FreeRTOS working with the bootloader, as I am currently having similar issues with the same port (onto my own LPC2148 board but still running a similar bootloader). Thanks!
Ahahah, finally I got an activation code from Rowley. I just need to quickly create a project relocated at 0x10000 now.
finger563:
Also, do you still need an activation key from Rowley? I have a fully activated CrossStudio 2.0 if that is still of any use to you.
jstoezel:
Heythere, I’ve started a thread pointing to my blog that explains how to do it.
SFE thread: viewtopic.php?f=14&t=23030&p=106375&hil … os#p106375
My blog’s entry: http://sites.google.com/site/logodynami … tingsystem
Let me know when you get it to work on your board
finger563:
I know this is a few months later than the original post, but I was wondering if you could expand/explain further how you got FreeRTOS working with the bootloader, as I am currently having similar issues with the same port (onto my own LPC2148 board but still running a similar bootloader). Thanks!