Location>code7788 >text

embedded development

Popularity:133 ℃/2024-09-19 11:22:13

Golden Gourd STM32L431 Hands-On Flow

Textbook titles and development boards

Textbook: Embedded Technology Fundamentals and Practice (6th Edition) (edited by Yihuai Wang)

Development Board: AHL-STM32L431

Golden Gourd STM32L431 Hands-On Flow

1. Software and electronic resources to be used

AHL-GEC-IDE(4.55)————>AHL-GEC-IDE ()
AHL-MCU6-V2.0-20240118————>Embedded Book 6 Edition ()

IDE Software Installation Process

Software installation is the same as always, choose a disk area other than the c-disk, of course, direct installation is also nothing

The only thing you need to pay attention to is the environment variables to be checked, and secondly, remember to reboot your computer after the installation is complete!

IDE Software Usage Flow

initial step

After the installation is complete, open our IDE software, which looks a bit like a huckleberry hahahaha, as shown here

fig:

second step

After opening the software looks like the picture below, there is a real-time time in the bottom right corner, it feels pretty good!

fig:

third step

Click Download --> Serial Port Update to go to the next screen

fig:

fourth step

Click on Connect GEC and it will automatically search for detected devices on its own

fig:

Problem 1: This happens because you didn't plug in the development board and it didn't detect the board

fig:

Well, the solution is to plug in the development board, the development board green light, that is working, if it is a red light, do not worry, wait a dozen seconds, it will switch to the green light, as follows

fig:

Next, let's reconnect the GEC and try it out.

fig:

After the connection is successful and the IDE finds the development board, it looks like this, and then you can brush and write the program.

fig:

Some students did not connect successfully, may be because there is no reboot, the board did not switch to the green light, this time to press the reset button six times, and then try to connect, if you still can not connect, then as a tenacious, restart the software, reboot the computer, many times after the attempts, you will find that you are really a tenacious, funny, but also hope that you have mercy on the mouth (nerves, so that I write here all laughed)

fifth step

Get to know machine code. What can machine code do? To start the whole thing, click the Select File button to import the .hex file from Debug in the compiled project directory, and then click "One Click Auto Update".

Okay, I'll go straight to the pictures.

Importing machine code

fig:

The file you need to select here is in the book's accompanying textbook, so find the file that accompanies the textbook you downloaded.

fig:

fig:

fig:

fig:

fig:

Then after you have selected the file, click on Open

fig:

Here's what happens next.

fig:

When this happens, it means you've imported successfully, and the next step is the

fig:

After clicking One Click Update, the following image will appear

The picture below shows when it first started to run

fig:

Wait a little while for the bullet to fly (i.e., wait for it to run for a while first), and the following image will appear

fig:

This program is what reads the chip, and the temperature of the thermistor, and also controls changes in the on-board LEDs, etc.

sixth step

That is, to confirm that the IDE can compile the project (that is, to see if it can run the c program)

ok, let's import our project first (aka import folder)

fig:

The path is here, click here, and then click "Selected Folders."

fig:

Okay, that's it, the project was imported successfully! How to compile? If you are careful, you may have already seen

fig:

After clicking Compile Project, it will automatically run

fig:

As you can see in the picture below, this is a successful compilation!

fig:

There we go! Looks like we're okay with the IDE.