Suga koubou
/
DynamicLoad
dynamic load and run users binary file. self write the flash memory.
Revision 3:5cf31386b95d, committed 2011-12-27
- Comitter:
- okini3939
- Date:
- Tue Dec 27 17:02:56 2011 +0000
- Parent:
- 2:c56b5e682f0c
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c56b5e682f0c -r 5cf31386b95d main.cpp --- a/main.cpp Tue Dec 27 16:57:59 2011 +0000 +++ b/main.cpp Tue Dec 27 17:02:56 2011 +0000 @@ -117,7 +117,10 @@ printf( "device-ID = 0x%08X, serial# = 0x%08X, CPU running %dkHz\r\n", iap.read_ID(), iap.read_serial(), SystemCoreClock / 1000 ); - loadbinary("/local/test.dat"); + if (loadbinary("/local/test.dat")) { + printf("error loadbinary\r\n"); + return -1; + } // memdump( sector_start_adress[ TARGET_SECTOR ], 48 * 4);