Code to load a LPC1114 over tx/rx. I have only tested with a 1114 chip but it should work with other LPC uControllers
Dependencies: DirectoryList MODSERIAL mbed
Fork of ika_shouyu_poppoyaki by
Revision 52:afd15e54142f, committed 2015-07-26
- Comitter:
- ChrisABailey
- Date:
- Sun Jul 26 14:46:23 2015 +0000
- Parent:
- 51:981107d4e84f
- Commit message:
- Use MBED to load LPC1114. Modified to also load LPExpresso 1114 board
Changed in this revision
diff -r 981107d4e84f -r afd15e54142f _user_settings.h --- a/_user_settings.h Sun Jul 05 01:41:12 2015 +0000 +++ b/_user_settings.h Sun Jul 26 14:46:23 2015 +0000 @@ -20,7 +20,7 @@ // suppress "command and result" monitoring output to terminal // the "command and result" monitoring feature is made for debugging. -#define SUPPRESS_COMMAND_RESULT_MESSAGE +//#define SUPPRESS_COMMAND_RESULT_MESSAGE // enable "AUTO_PROGRAM_START" to let target starts the program after flash writing complete
diff -r 981107d4e84f -r afd15e54142f isp.cpp --- a/isp.cpp Sun Jul 05 01:41:12 2015 +0000 +++ b/isp.cpp Sun Jul 26 14:46:23 2015 +0000 @@ -32,6 +32,7 @@ int transferred_size; int err; + printf( " looking for target to write \"%s\"\r\n", file_name ); if ( NULL == (tpp = open_target( ISP_BAUD_RATE )) ) { return ( ERROR_AT_TARGET_OPEN ); }
diff -r 981107d4e84f -r afd15e54142f mbed.bld --- a/mbed.bld Sun Jul 05 01:41:12 2015 +0000 +++ b/mbed.bld Sun Jul 26 14:46:23 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/da0ca467f8b5 \ No newline at end of file
diff -r 981107d4e84f -r afd15e54142f target_handling.cpp --- a/target_handling.cpp Sun Jul 05 01:41:12 2015 +0000 +++ b/target_handling.cpp Sun Jul 26 14:46:23 2015 +0000 @@ -17,6 +17,7 @@ char str_buf1[ STR_BUFF_SIZE ]; int retry_count = 3; + printf ("Setting baude rate to %d \r\n",baud_date); set_target_baud_rate( baud_date ); while ( retry_count-- ) {
diff -r 981107d4e84f -r afd15e54142f target_table.cpp --- a/target_table.cpp Sun Jul 05 01:41:12 2015 +0000 +++ b/target_table.cpp Sun Jul 26 14:46:23 2015 +0000 @@ -8,6 +8,7 @@ { "unknown ttarget", 0xFFFFFFFF, 1024, 4096, 4096, UUENCODE, 0x10000200 }, { "LPC1114FN28(FDH28)/102", 0x0A40902B, 4096, 32768, 4096, UUENCODE, 0x10000200 }, { "LPC1114FN28(FDH28)/102", 0x1A40902B, 4096, 32768, 4096, UUENCODE, 0x10000200 }, + { "LPC1114(EM773FHN33/301)" , 0x0444102B, 4096, 32768, 4096, UUENCODE, 0x10000200 }, { "LPC810M021FN8", 0x00008100, 1024, 4096, 1024, BINARY, 0x10000300 }, { "LPC811M001JDH16", 0x00008110, 2048, 8192, 1024, BINARY, 0x10000300 }, { "LPC812M101JDH16", 0x00008120, 4096, 16384, 1024, BINARY, 0x10000300 }, @@ -31,7 +32,7 @@ int id; id = atoi( device_id_string ); - + printf("looking for ID %d 0x%x\r\n",id,id); for ( int i = 1; i < (sizeof( target_table ) / sizeof( target_param )); i++ ) { if ( id == target_table[ i ].id ) return ( &(target_table[ i ]) );