this transfers data (which is stored in "bin" file in mbed storage) into LPC1114, LPC1115, LPC81x, LPC82x, LPC1768/LPC1769 and LPC11U68/LPC11E68 internal flash memory through ISP.

Dependencies:   mbed MODSERIAL DirectoryList

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers _user_settings.h Source File

_user_settings.h

00001 #ifndef MBED_ISP___USER_SETTINGS__
00002 #define MBED_ISP___USER_SETTINGS__
00003 
00004 ///  file name for the binary data
00005 //  edit here if you need to use different file name or storage media
00006 #define     SOURCE_FILE         "/local/bin"
00007 #define     SUFFIX_FILTER_STR   "*"
00008 
00009 
00010 //  "ISP_BAUD_RATE" is baud rate for ISP operation
00011 #define     ISP_BAUD_RATE       115200
00012 
00013 
00014 //  "TARGET_OPERATION_BAUD_RATE" is baud rate for USB-serial bridge operation after 
00015 //  ISP completion. 
00016 //  if the target application uses serial(UART) and you use the bridge feature, 
00017 //  please set this value correctly. 
00018 #define     TARGET_OPERATION_BAUD_RATE  9600
00019 
00020 
00021 //  suppress "command and result" monitoring output to terminal
00022 //  the "command and result" monitoring feature is made for debugging. 
00023 #define     SUPPRESS_COMMAND_RESULT_MESSAGE
00024 
00025 
00026 //  enable "AUTO_PROGRAM_START" to let target starts the program after flash writing complete
00027 #define     AUTO_PROGRAM_START
00028 
00029 
00030 //  disabling "ENABLE_WRITING" can be used for "verification only" operation.
00031 #define     ENABLE_WRITING
00032 
00033 
00034 //  enable "ENABLE_VERIFYING" to let perform verification by comparing "bin" file and flash read data.
00035 #define     ENABLE_VERIFYING
00036 
00037 
00038 //  enable "ENABLR_PROGRESS_DISPLAY" to let display data write/verify progress.
00039 #define     ENABLE_PROGRESS_DISPLAY
00040 
00041 
00042 //  enable "CHECK_CRP_CODE" to check the CRP (Code Read Protection). The ISP writing will be ignored if "bin" file has CRP code. 
00043 #define     CHECK_CRP_CODE
00044 
00045 
00046 //  enable "ENABLE_VERIFYING" to let perform verification by comparing "bin" file and flash read data.
00047 #define     ENABLE_FILE_SELECTOR
00048 
00049 
00050 #endif  //  MBED_ISP___USER_SETTINGS__
00051 
00052 
00053 
00054 
00055 ////////////////////////////
00056 //  FOLLOWING IS MESSAGE THAT WILL BE SHOWN WHEN COMPILE THIS CODE
00057 //  you can edit next lines if you want remove error/warning message
00058 ///////////////////////////
00059 
00060 #if     defined( ENABLE_WRITING ) && defined( ENABLE_VERIFYING )
00061     #define WHAT_WAS_DONE    "written and verified"
00062 #elif   defined( ENABLE_WRITING ) && !defined( ENABLE_VERIFYING )
00063     #define WHAT_WAS_DONE    "written"
00064     #warning "ENABLE_VERIFYING" in "_user_setting.h" is disabled. No verification will be performed.
00065 #elif   !defined( ENABLE_WRITING ) && defined( ENABLE_VERIFYING )
00066     #define WHAT_WAS_DONE    "verified"
00067     #warning "ENABLE_WRITING" in "_user_setting.h" is disabled. No writing will be performed.
00068 #else
00069     #error both "ENABLE_WRITING" and "ENABLE_VERIFYING" are disabled ("in user_setting.h"). The program need to execute nothing
00070 #endif
00071