tinnedkarma commented on issue #16416:
URL: https://github.com/apache/nuttx/issues/16416#issuecomment-2953859550

   Hi @stbenn 
   
   I do not have relevant experience on nuttx explicitly regarding your issue, 
but I can give you some relevant input based on my experience.
   
   **If if also happens if you are not under debug, my input does not apply**
   
   I see that you refer to this issue only when debugging.
   
   I've run into similar problem on some project. My concussion were that, in 
embedded environment everything is linked statically (everything is placed in 
memory at compile time, not loaded, as in Linux).
   
   I also expect that you are using that bank swap functionality for firmware 
update, load a file into the other flash bank and reset the mcu after. So, 
after the mcu restart everything is shifted (to the new bank), but the compiled 
binary (I expect elf file) still holds the original addresses, so what end up 
happening is that you are placing the breakpoints at wrong addresses. If my 
assumption is correct we either cannot debug the target after a fw update, or 
we need to come up with an solution for that memory shift between banks.
   
   Another thing I've saw is that, by default the flash bank that is not used 
is locked, it will memfault if and mpu region is configured over that flash 
bank, or hardfault if used without mpu.
   
   **Again, this assumptions are correct if the device is running fine on the 
swapped bank without the debugger attached**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to