Hello,

after reading and looking at the examples in this data sheet: PIC32MX Section 3. Memory Organization
http://ww1.microchip.com/downloads/en/DeviceDoc/61115F.pdf
 i think the settings in pic32mx.cfg are wrong, but ...

Suppose we have 16K of RAM. ( *_WORKAREASIZE 0x4000*).

* set _PIC32MX_DATASIZE 0x800 * 2K * set _PIC32MX_PROGSIZE [expr ($_WORKAREASIZE - $_PIC32MX_DATASIZE)] * 14K


*# BMXDKPBA: 2k kernel data @ 0xa0000800
     mww 0xbf882010 $_PIC32MX_DATASIZE *

  OK:  2k kernel data from 0xa0000000 to 0xa0000800


* # BMXDUDBA: 16k kernel program @ 0xa0000800*
* mww 0xbf882020 $_PIC32MX_PROGSIZE * Why not 16K (_WORKAREASIZE)?

Now we have kernel program memory from 2k to 14k and from 14k to 16k in user space 2k.
 Kernel program memory starts at 0xa0000800. Size 12k.

*# BMXDUPBA: 0k user program*
* mww 0xbf882030 $_PIC32MX_PROGSIZE * Why not 16K (_WORKAREASIZE)?

 Now we have 2k user program memory, and 0k user data  memory.


* $_TARGETNAME configure -work-area-phys 0xa0000800 -work-area-size $_PIC32MX_PROGSIZE -work-area-backup 0*

 We set -work-area-size to 14K   but we have only 12k.


At first glance, with actual driver code, this is not a problem if we have 16k RAM or more memory. But with 8k or 4k probably it will not work. For example with 4K RAM we end up setting -work-area-size to 2K but there is no kernel program memory at all.

I am wrong?

Thanks, Salvador.





------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to