STM32 Cube Programmer
Erases, programs, views and verifies the content of the device Flash memory
Setting up and connecting your NUCLEO board.
1. Start STM32 Cube Programmer application. 2. Attach the USB cable to the NUCLEO board 3. Attach the USB cable to your computer. 4. Find the ST-LINK configuration panel located on the right side of the Main Menu. 5. Locate Under the Not Connected status a Blue (ST-Link) button with a drop down menu. 6. Ensure ST-Link is selected and not UART or USB in the drop down menu. 7. Click on the Green Connect button to connect the NUCLEO board with the built in ST-Link to the computer 8. Ensure the Not connected status message has changed to Connected and the ST-LINK configuration should be greyed out. 9. Ensure you are connected by reading the Target information.
Reading and displaying target memory
1. Ensure the ST-Link is connected and working as stated above. 2. Specify the Address and the Size of the data to be read. Example: Address 0x08000000 Size 0x8000 Data Width 8 bit Size reference: 0X400 = 1024 (default) 0X4000 = 16K 0X8000 = 32K (full size of flash for NUCLEO-C0316) 0x10000 = 64K 3. Select Read or Read all
Reading and displaying a file from a previously saved program.
1. To open and display a file, just click on the “+” and select “Open File” 2. Select the file from the list in the directory. Example: myfile.bin The file size is displayed in the “Size” field. The start address of hex, srec, or ELF files, is displayed in the “Address” field. For a binary file it is 0x0 in the “Address” field.
Memory sectors are displayed in the right-hand panel showing the start address and the size of each sector. To erase one or more sectors: 1. Select them in the first column. 2. Then click on the “Erase selected sectors” button. The “Full chip erase” button erases the whole memory.
To program a memory, go through the following steps: 1. Click on the browse button and select the file to be programmed. The supported formats are: binary files (.bin), ELF files (.elf, .axf, .out) Intel hex files (.hex) Motorola S-record files (.Srec). 2. In case of programming a binary file, the address must be set. Example: 0x0800000 3. Select the programming options: – Verify after programming: read back the programmed memory and compare it byte per byte with the file. – Skip flash memory erase before programming: if checked, the memory is not erased before programming. This option must be checked only when you are sure that the target memory is already erased. – Run after programming: start the application just after programming. 4. Click on the ”Start programming” button to start programming. The progress bar on the bottom of the window shows the progress of the erase and programming operations.