NUCLEO-U5A5ZJ-Q unboxing review, the development board uses the newer ARM Cortex-M33 core STM32U5A5ZJ chip, which is a new MCU type launched by ST. In addition to the main frequency increased to 160MHZ, it also integrates 4MB of Flash. I really don’t know what to use such a large flash for. If it is a GUI development project, it should be very ideal. In addition to the traditional Uart, SPI, IIC, ADC, DAC and other peripherals, the chip also integrates two peripherals, USB OTG and CAN FD. In particular, CAN FD peripherals have become more and more popular in recent years, and it feels a level higher than the previous generation of M4 cores. Moreover, the chip can be directly powered by an external power pin, and this setting can greatly reduce the power consumption of the chip. The only regret is that the voltage is 1.8V. It would be great if it could be reduced to 1.5V, so that common dry batteries can be used. The other is that the ADC is increased to 14bit, the DAC is increased to 12bit, and 4 32-bit timers are provided. These are all the functions I need for my project. Thanks to EEWORLD and ST for their generosity in giving me early access to this new product.
The development board does not have many peripherals, mainly USB PHY, 3 LEDs and a BUTTON. The first step is to turn on the lights. In addition to the two commercial tools IAR and Keil, there is also the eclipse-based STM32CubeIDE environment. However, I am speechless about this Eclipse tool. This time, I used VSCode and STM32CubeCLT (GNU C/C++ compiler and STM32 STLink) to build the development environment. It took me two days to succeed.
Let’s warm up with a picture first.
The process is as follows:
1. Install VSCODE. This is relatively simple. You can download it directly from https://code.visualstudio.com/download .
2. Download the C/C++ control and CMAKE control in the figure.
These are necessary extensions for the C/C++ development environment. They not only support the embedded GNU compiler, but also other C/C++ compilers.
3. Install STM32CubeCLT, https://www.st.com/en/development-tools/stm32cubeclt.html , which is an integrated tool from ST.
This is an executable file st-stm32cubeclt_1.14.0_19471_20231121_1200_x86_64.exe. Just install it.
There is a pitfall here that needs to be noted. The installation directory needs to be "C:\ST\STM32CubeCLT\STM32CubeCLT". If you change it to other locations, it will be very troublesome! Nothing happens after installation.
4. Install STM32 VS Code Extension, which is a software produced by ST. It can be used together with STM32CubeMX.
5. Start a project using STM32CubeMX.
Using the GPIO_IOToggle project
Generate STM32CubeIDE type project.
6. Import the project as a VSCode project.
Click the STM32 icon and select import a local project.
Select the .cproject file and click Open.
After the project is imported, there will be more files such as CMakeLists.txt in the project folder.
You will need to wait for a long time for the first time. It is mainly used to configure the environment.
7. Configuration Project
Select configure All Projects, and then you can automatically configure the CMAKE project.
8. Debug the project.
It is necessary to set breakpoints in the source code in advance. If not set, the program will not be able to break.
Then press the debug icon to start the project
Start debugging after booting.
Continue execution until the breakpoint is reached.
Successfully interrupted. For more debugging functions, refer to the GDB manual.
Summarize:
Comparing the VSCODE environment with the commercial ones, except that the configuration is a bit more complicated, most of the functions are not much different, and the editing function is even better.