STM32 Cube Programmer
Revision as of 23:53, 24 February 2023 by U731219879 rc (talk | contribs)
Erases, programs, views and verifies the content of the device Flash memory
Getting Started 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. Now 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 X 4 = 1600 (default) 0X4000 X 4 = 16000 0X8000 X 4 = 32000 (full size of flash for NUCLEO-C0316) 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 erasing 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.
Memory programming 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. 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.