Skip to content

Commit

Permalink
bootloader now working with DyIO
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Oct 15, 2014
1 parent 739b08a commit b4310ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Platform/src/pic32/bootloader/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ void writeWordFlash(uint32_t address,uint32_t data){
if (address >= StartAppVectPhysical && (address < EndAppVectPhysical)){
NVMWriteWord((uint32_t*)address, data);
if ((*(int *)(address|0x80000000)) != data){
//printfDEBUG("##Write FAILED!!");
println_E("FAULT read did not match write on address: ");prHEX32(address,ERROR_PRINT);
eraseFlash();
callBootloaderReset();
}
}
}else{
println_E("FAULT can not reach address: ");prHEX32(address,ERROR_PRINT);
}

}

Expand Down
6 changes: 3 additions & 3 deletions toolchain/pic32/bootloader-app/elf32pic32mx.ld
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ENTRY(_reset)
* the command line using the linker's --defsym option.
*/
EXTERN (_min_stack_size _min_heap_size)
PROVIDE(_min_stack_size = 0x800) ;
PROVIDE(_min_stack_size = 0x200) ;
PROVIDE(_min_heap_size = 0xff) ;
INCLUDE nr_procdefs.ld

_DATA_ADDR = 0xA0000800;
_BSS_ADDR = 0xA0001000;
_DATA_ADDR = 0xA0000200;
_BSS_ADDR = 0xA0001800;

SECTIONS
{
Expand Down

0 comments on commit b4310ef

Please sign in to comment.