• AVR Freaks

Helpful ReplyHot!Can't figure out whats wrong with my linkers... 32MX470F512L

Author
seccoxiru
Junior Member
  • Total Posts : 96
  • Reward points : 0
  • Joined: 2011/10/27 13:42:59
  • Location: 0
  • Status: offline
2019/08/15 16:21:33 (permalink)
0

Can't figure out whats wrong with my linkers... 32MX470F512L

Hi.
Two months ago I did a bootloader for a 32MX270F256D via UART using AN1388 and it worked, in this case I edited the default linker of the PIC (270F) and all worked correctly.
Now I am trying to adapt this bootloader for a 32MX470F512L. Again, I edited the default linker of the PIC (470F) following the same steps as I did with the other PIC (270F), but I am not figuring out whats happening. In the bootloader PC app, when I click on "Run Application" after programming the flash, the PIC does not start the application that was just written.
 
Can somebody help me to identify whats wrong with my linkers?
OBS: I modified the extension from .ld to .txt to be able to attach the files.
 
Thanks in advance.
Regards.
 
 

Attached Image(s)

#1
aschen0866
Super Member
  • Total Posts : 4494
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: Can't figure out whats wrong with my linkers... 32MX470F512L 2019/08/16 07:55:12 (permalink)
5 (1)
The PIC32MX470 family has page size 4KB and row size 512 while the PIC32MX270 family has page size 1KB and row size 128. Did you make these changes accordingly?
#2
seccoxiru
Junior Member
  • Total Posts : 96
  • Reward points : 0
  • Joined: 2011/10/27 13:42:59
  • Location: 0
  • Status: offline
Re: Can't figure out whats wrong with my linkers... 32MX470F512L 2019/08/19 10:06:02 (permalink)
0
aschen0866
The PIC32MX470 family has page size 4KB and row size 512 while the PIC32MX270 family has page size 1KB and row size 128. Did you make these changes accordingly?




There is a NVMem.h where this is inside:
 
#define PAGE_SIZE 1024                            // # of 32-bit Instructions per Page
#define BYTE_PAGE_SIZE (4 * PAGE_SIZE)  // Page size in Bytes
#define ROW_SIZE 128                               // # of 32-bit Instructions per Row
#define BYTE_ROW_SIZE (4 * ROW_SIZE)   // # Row size in Bytes
#define NUM_ROWS_PAGE 8                       //Number of Rows per Page
 
I change PAGE_SIZE to 4096 and ROW_SIZE to 512 but is not working too.
 
 
Does my linkers looks correct?
 
 
post edited by seccoxiru - 2019/08/19 10:09:26
#3
aschen0866
Super Member
  • Total Posts : 4494
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: Can't figure out whats wrong with my linkers... 32MX470F512L 2019/08/19 10:48:34 (permalink) ☄ Helpfulby seccoxiru 2019/08/28 11:52:56
4.5 (2)
Both bootloader and application linker scripts look fine to me. Here is the bootloader and application simulations using your linker scripts. 
#4
seccoxiru
Junior Member
  • Total Posts : 96
  • Reward points : 0
  • Joined: 2011/10/27 13:42:59
  • Location: 0
  • Status: offline
Re: Can't figure out whats wrong with my linkers... 32MX470F512L 2019/08/28 11:54:56 (permalink)
0
aschen0866
Both bootloader and application linker scripts look fine to me. Here is the bootloader and application simulations using your linker scripts. 



Thanks very much for revising the linkers.
I have tested again today and now its working correctly, I don't know what I did incorrect the other time.
 
#5
Jump to:
© 2019 APG vNext Commercial Version 4.5