Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 63677

Forum Post: MSP430 multiple firmwares switching and updating

$
0
0
Dear MSP community, I am currently trying to develop a firmware with a partition in the memory map so that i can have a "stable firmware image" and a "bleeding edge-firmware" somewhere in higher memory. Here what it is supposed to be doing: - stable part: boot and provide minimal functionality, provide a way to switch to bleeding-edge firmware, provide a way to update bleeding edge firmware. - bleeding-edge part: provide extended functionalities. I would actually want not to develop a bootloader but something more "high-level" (since my bootloader IRL would require lots of libs, and then my MSP won't have enough space to handle all 3 -boot, standard, bleeding edge- firmwares) where the choice for boot can be located at the start of the global main (this choice, would either call the stable part or the bleeding-edge part. Anyways, I managed to do such a thing by tweaking the linker .cmd file in a first CCS project so as to flash an initial bleeding-edge loop at a given location in memory (let's say 0xd000) and flash the whole other stuff at default memory addresses. Flashing creating another project (in CCS) and tweaked again the linker cmd file so that a new bleeding-edge loop would end up at the exact same address (0xd000) and other sections would not appear at addresses overlapping with the first project. (i.e. my linker file contained only addresses for RAM/FLASH but the flash address was changed in order not to overlap with previous data from the first project, all sections except the ones really linked to the new project were removed -ie no .reset allocation, etc...) Flashing without erasing everything in memory (i.e. replacing only the part at 0xd000 Though this worked pretty well at start, things got nasty when i tried to do the same, but with interrupts handling. In order to do so, I used RAM-based interrupt vector (using the SYSRIVECT present in some MSP). I did the same kind of project and changed the interrupts so that they are relocated to RAM. It works well when flashing the initial firmware, but when i reflash my second firmware, and try to branch to it, everything fails. (I tried to compare HEX files a the given location (0xd000), the beginning looks similar but it won't work (the program hangs and i cannot debug since the symbols in the two projects are not shared... however the disassembly looks ok). Sorry for the long post but the issue is quite difficult to explain rapidly, eventhough i am not sure it is clearer now... ==> Do you have any advices on how to flash 2 firmware on a microcontroler one of them being possibly updated later on (i.e. in application flashing), is my approach wrong (mapping the second "firmware" at a given location) ? ==> Do you have any recommendations for using SYSRIVECT ? (seems to work well when I have one firmware, but i might be missing something...) I will try to post a MnWE asap =) Thanks a lot !!!

Viewing all articles
Browse latest Browse all 63677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>