Continuation of the series of articles about the assembler editor for ARM microcontrollers for the GNU AS compiler
Previous Article Assembler Editor Plus: Installation
Pictures under the cut!
So, we got to the creation of the first project.
Important note: the editor itself processes the texts of programs in assembly language in accordance with the rules that are described in external configuration files, therefore, it is possible to describe new rules for any ARM microcontrollers with kernels that are supported by gnu as (and their list is very significant!).
As you understand, the project is now too young to have rules for the full range of microcontrollers - it's just that not all of them are described yet, this is not a big problem if you are ready to help in describing the microcontroller (I will talk about this later), but if you are not ready, then you will have to wait a little while these settings are made for your microcontroller.
Now microcontrollers of the STM32F4x family are being actively described, the main one for testing is STM32F407, so the first example will be specifically for this microcontroller, it is used in the STM32F4 Discovery debug board from ST, I have this microcontroller on the Open407I-C debug board (the documentation is in the Add \ folder MCUDoc in Easy editor for download, see previous article), or STM32F4VE (Chinese scarf, also with aliexpress)
So, start the editor, and select "Project" - "New" and after specifying the folder and name for storing the project files, the project settings window will be shown
In this window, you need to set the microcontroller used in the project, click "Set", and select STM32F407
The microcontroller settings will be read and the project settings fields will be filled in:
The .syntax .cpu .thumb .fpu fields are the compilation options for the selected microcontroller,
Firmware address - where the firmware will be written to
on the Configuration tab , settings for the editor itself, you are unlikely to have to change them yourself, even in the future
Next, go to the Directories tab
, " " .bat - .
"".
:
[ 1 ] -
[ 2 ] -
[ 3 ] - : , ,
[ 4 ] -
[ 5 ] -
, src , , , , - , "" - " "
, " (main.asm)"
, , "" ,
"" - " "
, " " ,
" ", , ( )
"" - " "
\compile , sys.sasm, sys.bin sys.hex ( , )
, "" - " ..." ST-Link - ST-Link [direct] - ST ( ), (J-Link) OpenOCD ( )
,
"" - " [OpenOCD]"
"" (Running),
, : "HALT" ( ), "RESET HALT" ( )
, ,
, "STEP IN" ( ) "STEP OVER" .
"STEP IN" 008000048, SYSCLK168_START
.
, BIN -> HEX -> DEC
You can view the current values ββin the microcontroller's memory, for convenience, you can set several different addresses, the dimension of the view, the size of the memory area (but do not overdo it).
In order to continue the execution of the program, press the "RESUME"
That's all for today, in the next article we will write something more visual, traditionally flashing LEDs, using editor modules and also with minimal effort on the keyboard (we still need them), at the same time we will analyze just those editor functions for which he and originally conceived