1.5.1 Development and Testing
Due to the protections in the BSL memory, it can often be difficult to debug and develop BSL code. For "high level" development, such as a new Peripheral Interface, it is easy to develop the BSL as an application that runs out of user code flash.
- Remove the BSL430_Low_Level_Init.s43 from the project build (right click the file in IAR, select "remove from build").
- Use a linker command file from the CONFIG directory that puts the BSL in the "FLASH_AREA" (Project → Options → Linker → Config → Override default).
- Run the external application (BSL_Scripter.exe for example) without causing a device reset during the BSL invoke sequence.
- Do not send an incorrect password or trigger a mass erase (remember, IAR builds the RESET vector automatically, so the password includes this).
For development and debugging in the BSL_Protect function, either the simulator can be used or the BSL memory protection bits can be left open during debugging. In either case, "Run to Main" should be unchecked.