SiFli-Wiki SiFli-Wiki SiFli-Wiki
  • User Guide
  • Examples
  • API Documentation
  • About Us
/
  • English
  • 中文

Quick start

  • Getting Started Guide
  • Chip Manual Summary

Software Development

  • SDK Documentation
  • FAQ
    • Development tool related issues
      • 1 Compilation Related
      • 2 Jlink
      • 3 KEIL
      • 4 Ozone
      • 5 SiFli
      • 6 Trace32
      • 7 SystemView
      • 8 Serial port
      • 9 Source Insight相关
    • Chip related issues;
      • 1 GPIO相关
      • 2 定时器相关
      • 3 Middle;断相关
      • 4 Watchdog;相关
      • 5 RTC相关
      • 6 ADC相关
      • 7 I2C相关
      • 8 低功耗相关
      • 9 PWM
      • 10 系统
      • 11 Bluetooth;
      • 12 USB相关
      • 13 UART相关
      • 14 双核相关
      • 15 I2S;related;
      • 13; SPI related issues;
    • Peripheral driver debugging issues;
      • 1 LCD调试常见问题
      • 2 Sensor调试常见问题
      • 3 flash调试常见问题
      • 4 马达motor调试常见问题
    • Software debugging related issues;
      • 1 Log调试
      • 2 在线调试方法
      • 3 Restore crash scene by dumping memory;
      • 4 Method for saving crash scene;
  • Application Notes
    • SF32LB52X启动与低功耗流程
    • 低功耗开发指南

Hardware Development

  • SiFliModel Selection Manual
    • SiFli Chip Model Guide
    • Module Model Guide
  • Chip Hardware Design Guide
    • SF32LB52x-Hardware Design Guide
    • SF32LB52X-Hardware Design Guide
    • SF32LB56xU-Hardware Design Guide
    • SF32LB56xV-Hardware Design Guide
    • SF32LB58x-Hardware Design Guide
  • Development Board
    • SF32LB52-DevKit-LCD开发板使用指南
    • SF32LB52-DevKit-LCDAdapter board制作指南
    • 立创·黄山派开发板使用指南
    • SF32LB52-DevKit-Nano Development Board User Guide

Software Tools

  • Software and Hardware Tools Collection
    • firmwareburningTool Impeller
    • Graphics ConversionTool
    • Storage Debugging Tools
      • Flash Chipid 和TypeConfiguration Guide
    • Screen module调试
      • screen模组介绍
      • 思澈SDKOf显示框架介绍
      • AdjoinCurrentProjectionBlock
        • 添加新的屏幕驱动
        • AddNew屏幕BacklightDriver
        • Add a new TP driver
        • 为新的屏幕模组添加menuconfig选项
      • Use the new screen module
      • 525添加QSPI-LCD实例
      • 566添加DPI-LCD实例
      • FAQ
      • Appendix
        • 屏驱回调函数
        • Application Layer vs Module Driver Layer Function Correspondence Table
        • List of adapted screen modules
    • sftool

Product Introduction

  • About SiFi

On this page

  • 1.1 How to disassemble axf files into asm assembly or bin files
  • 1.2 Supported compilers and versions
  • 1.3 Default Lcpu project path in SDK project
  • 1.4 How unused global variables are compiled without being optimized
  • 1.5 How to solve the compilation exception problem caused by Windows TMP directory files
  • 1.6 Common compilation errors
  • 1.7 Method to force a function to be a non-inline function
  1. SiFli-Wiki /
  2. FAQ /
  3. Development tool related issues /
  4. 1 Compilation Related

1 Compilation Related¶

1.1 How to disassemble axf files into asm assembly or bin files¶

Use Keil’s fromelf.exe toolFirst place the axf file that needs to be disassembled inC:\Keil_v5\ARM\ARMCC\bin, Then type the command in the cmd window:

c:\Keil_v5\ARM\ARMCC\bin\fromelf.exe lcpu_rom.axf --text -c >lcpu_rom.asm
c:\Keil_v5\ARM\ARMCC\bin\fromelf.exe hcpu.axf --text -c >hcpu.asm

Output bin file from axf file:

c:\Keil_v5\ARM\ARMCC\bin\fromelf.exe --bin --output=./lcpuaxf.bin ./lcpu.axf

1.2 Supported compilers and versions¶

Keil, recommended version: alt text
GCC, recommended version: alt text

1.3 Default Lcpu project path in SDK project¶

Please see the screenshot below during compilation, there is a copy operation, alt text
The file …….\rom_bin\lcpu_general_ble_img\lcpu_lb551.c comes from the compilation of sdk\example\ble\lcpu_general\project\ec-lb551\ project The specific code copy operations are in the prebuild.bat batch file before compilation and the postbuild.bat batch file after compilation in the corresponding project directory. alt text
alt text
scons –target=mdk5 will run the following alt text
Compiling with Keil prompts as follows: alt text
keilExecute batch configuration before and after compilation, See issue.:2.3.1

1.4 How unused global variables are compiled without being optimized¶

For the convenience of debugging, some values are placed in a global variable for easy viewing. Unused variables at this time will be optimized, You can add the declaration volatile in front when defining the variable, so it won’t be optimized,As follows:

volatile uint32_t flash_dev_id=0xffffffff;

1.5 How to solve the compilation exception problem caused by Windows TMP directory files¶

Sometimes it will be found that when compiling projects, the bootloader etc. generated under individual Windows PC environments will have problems;
In this case, it is necessary to check and confirm whether it is caused by the cache files in the Windows temporary directory, and the contents in the temporary directory can be cleaned up,The corresponding directory path can be confirmed/displayed via the command line: “echo %TMP%”, and all files and directories under the corresponding directory can be deleted。

1.6 Common compilation errors¶

(1) The code size of this image (xxx bytes) exceeds the maximum allowed for this version of the linker, how to solve?
When this error occurs, it is necessary to check if the Keil license is available。

1.7 Method to force a function to be a non-inline function¶

When tracking code in Ozone, you may encounter some functions programmed as inline functions, and the tracked code becomes assembly language, which is not convenient for tracking code,At this time, you can force the function to be a non-inline function, add a declaration in front of the function: attribute ( (noinline) ) or __NOINLINE

 #define __NOINLINE __attribute__ ( (noinline) )

As follows:

__attribute__ ( (noinline) ) uint8_t _pm_enter_sleep(struct rt_pm *pm)
Previous
Development tool related issues
Next
2 Jlink

2025, SiFli

Made with Sphinx and Shibuya theme.