[Fudan Micro FM33LG0 Series Development Board Review] Compile and Download
[Copy link]
This post was last edited by Beifang on 2021-11-26 10:35
[index]
[#1]1. GPIO project code analysis
[#2]2. Project compilation
3. Download the
code
1. GPIO project code analysis
No matter east, west, south or north, everything can be turned into a light bulb, so let’s start with GPIO. However, the code is really simple and clear.
#include "main.h"
#include "user_init.h"
int main(void)
{
MF_Clock_Init();
MF_SystemClock_Config();
FL_Init();
MF_Config_Init();
UserInit();
while(1)
{
LED0_TOG();
FL_DelayMs(5000);
}
}
Initialization includes clock, board, configuration and user customization, and then it is a loop.
LED0_TOG();
FL_DelayMs(5000);
The problem is that there is no API code guide. How can we solve this problem? In fact, it still comes from the manufacturer's definition document.
#define LED0_TOG() FL_GPIO_ToggleOutputPin(LED0_GPIO, LED0_PIN)
The files are all from the following
#include "fm33lg0xx_fl.h"
2. Compilation of the project
Click Compile to start compiling directly and pass smoothly.
3. Code Download
If the blank chip is not soldered on this board, it should be a bare board with all the pins connected, and you need to bring your own debugger to download it.
After testing, the following models of debuggers are all available, one is jlink7.0, the other is jlink8.0. It seems that the chip does not have a verification and locking process. Among them, the jlink OB model is a public version limited to manufacturers, and it works well.
When using SW download, only two SWO and SCK are needed, which are for data and clock respectively, as shown below. When downloading, a reset key is also required. During the download process, this problem is prompted, but the download is successful without pressing reset.
The console output is as follows,
Build started: Project: FM33LG0XX_Tester
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Development\DesignParks\Keil_v5\ARM\ARMCC\Bin'
Build target 'Example'
".\Objects\FM33LC0xx_Tester.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:00
Load "D:\\Development\\DesignParks\\Keil_v5\\FM33LG0XX\\GPIO 示例\\MDK-ARM\\Objects\\FM33LC0xx_Tester.axf"
* JLink Info: Device "CORTEX-M0" selected.
Set JLink Project File to "D:\Development\DesignParks\Keil_v5\FM33LG0XX\GPIO 示例\MDK-ARM\JLinkSettings.ini"
* JLink Info: Device "CORTEX-M0" selected.
JLink info:
------------
DLL: V6.46 , compiled May 23 2019 17:49:56
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
S/N : 20090928
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull
* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770021)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x410CC300. Implementer code: 0x41 (ARM)
* JLink Info: Unknown core, assuming Cortex-M0
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00D ???
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via reset pin
**JLink Warning: RESET (pin 15) high, but should be low. Please check target hardware.
Target info:
------------
Device: FM33LG04X
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 1, TDO: 1, TMS: 0, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 1
JTAG speed: 2000 kHz
Erase Done.
Programming Done.
Verify OK.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via reset pin
**JLink Warning: RESET (pin 15) high, but should be low. Please check target hardware.
Application running ...
Flash Load finished at 10:16:24
Follow the instructions above. If the downloader does not have a dedicated download button, just press reset.
The original delay was 1 second, 1000ms. Changing it to 200ms flash mode went relatively smoothly, but it was a bit too flashy.
Complaint: I recently received a call from Digital China as an agent. I still think it is strange that domestic chips choose such an American company as an agent. Lenovo can make the company lose money and then go public on the Science and Technology Innovation Board. At the same time, the annual salary of executives is over 100 million, which is much higher than that of the boss Li Shufu. Instead of this, I prefer to use TI products. If I want to choose an agent, I will go to Arrow.
|