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
target_table.cpp@42:2b40666d8177, 2014-10-18 (annotated)
- Committer:
- k4zuki
- Date:
- Sat Oct 18 07:36:54 2014 +0000
- Revision:
- 42:2b40666d8177
- Parent:
- 28:689c3880e0e4
- Child:
- 44:568799eac6df
LPC82x series supported (only 824 is tested)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
okano | 5:ff30f5b58617 | 1 | #include "mbed.h" |
okano | 5:ff30f5b58617 | 2 | #include "target_table.h" |
okano | 5:ff30f5b58617 | 3 | |
okano | 5:ff30f5b58617 | 4 | target_param target_table[] = { |
okano | 12:5a33b5d39792 | 5 | { "unknown ttarget", 0xFFFFFFFF, 1024, 4096, 4096, UUENCODE, 0x10000200 }, |
okano | 12:5a33b5d39792 | 6 | { "LPC1114FN28(FDH28)/102", 0x0A40902B, 4096, 32768, 4096, UUENCODE, 0x10000200 }, |
okano | 12:5a33b5d39792 | 7 | { "LPC1114FN28(FDH28)/102", 0x1A40902B, 4096, 32768, 4096, UUENCODE, 0x10000200 }, |
okano | 12:5a33b5d39792 | 8 | { "LPC810M021FN8", 0x00008100, 1024, 4096, 1024, BINARY, 0x10000300 }, |
okano | 12:5a33b5d39792 | 9 | { "LPC811M001JDH16", 0x00008110, 2048, 8192, 1024, BINARY, 0x10000300 }, |
okano | 12:5a33b5d39792 | 10 | { "LPC812M101JDH16", 0x00008120, 4096, 16384, 1024, BINARY, 0x10000300 }, |
okano | 12:5a33b5d39792 | 11 | { "LPC812M101JD20", 0x00008121, 4096, 16384, 1024, BINARY, 0x10000300 }, |
okano | 12:5a33b5d39792 | 12 | { "LPC812M101JDH20", 0x00008122, 4096, 16384, 1024, BINARY, 0x10000300 }, |
k4zuki | 42:2b40666d8177 | 13 | ///added for LPC82x series |
k4zuki | 42:2b40666d8177 | 14 | { "LPC824M201JHI33", 0x00008241, 8192, 32768, 1024, BINARY, 0x10000300 }, |
k4zuki | 42:2b40666d8177 | 15 | { "LPC822M101JHI33", 0x00008221, 4096, 16384, 1024, BINARY, 0x10000300 }, |
k4zuki | 42:2b40666d8177 | 16 | { "LPC824M201JDH20", 0x00008242, 8192, 32768, 1024, BINARY, 0x10000300 }, |
k4zuki | 42:2b40666d8177 | 17 | { "LPC822M101JDH20", 0x00008222, 4096, 16384, 1024, BINARY, 0x10000300 }, |
k4zuki | 42:2b40666d8177 | 18 | |
okano | 5:ff30f5b58617 | 19 | }; |
okano | 5:ff30f5b58617 | 20 | |
okano | 5:ff30f5b58617 | 21 | target_param *find_target_param( char *device_id_string ) |
okano | 5:ff30f5b58617 | 22 | { |
okano | 5:ff30f5b58617 | 23 | int id; |
okano | 5:ff30f5b58617 | 24 | |
okano | 5:ff30f5b58617 | 25 | id = atoi( device_id_string ); |
okano | 5:ff30f5b58617 | 26 | |
okano | 5:ff30f5b58617 | 27 | for ( int i = 1; i < (sizeof( target_table ) / sizeof( target_param )); i++ ) |
okano | 5:ff30f5b58617 | 28 | { |
okano | 5:ff30f5b58617 | 29 | if ( id == target_table[ i ].id ) |
okano | 5:ff30f5b58617 | 30 | return ( &(target_table[ i ]) ); |
okano | 5:ff30f5b58617 | 31 | } |
okano | 5:ff30f5b58617 | 32 | |
okano | 28:689c3880e0e4 | 33 | // return ( target_table ); |
okano | 28:689c3880e0e4 | 34 | return ( NULL ); |
okano | 5:ff30f5b58617 | 35 | } |
okano | 26:a63e73885b21 | 36 |