Fullstar

Archives

  • December 2025
  • August 2024
  • July 2024
  • February 2024
  • November 2023
  • August 2023
  • July 2023
  • January 2023
  • November 2022
  • October 2022
  • September 2022
  • February 2022
  • January 2022
  • September 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Categories

  • Code
  • Lens
  • Life
0
Fullstar
  • Code

Windows下ARM编程实验

  • November 29, 2020
  • Brandon
Total
0
Shares
0
0
0

一.环境搭建

1.汇编集成环境:Keil uVision5,可网上查找破解版与基本使用方式
2.由于实验基于ARM9进行,因此需要继续安装ARM9支持包,具体安装方式可参考此链接:MDK5搭建ARM9开发环境

二.Keil运行c/c++程序提示错误

1.Error: L6630E: Invalid token start expected number or ( but found n at position 5 on line 5
解决方法:
在options 的Linker选项卡中不要选择 【Use Memory Layout from …】,并且把下边自动生成的Scatter file文本框清空。

2. L6218E: Undefined symbol Image ERROM1 RO$$Length (referred from s3c2440.o).
解决方法:
options的Asm选项卡下的define栏中输入__EVAL,即定义__EVAL

三.Arm汇编程序(.s)调用c/c++函数

1.在c/c++文件内定义函数
2.假设调用函数名为int Ledlamp(),则需要在文件头写入:IMPORT Ledlamp
3.若提示错误:Error: L6238E: test.o(DATA) contains invalid call from '~PRES8 (The user did not require code to preserve 8-byte aligment of 8-byte data objects)' function to 'REQ8 (Code was permitted to depend on the 8-byte aligment of 8-byte data items)' function Ledlamp.
解决方法:
在汇编文件的开头,添加“PRESERVE8”指令

;for example
PRESERVE8
IMPORT Ledlamp
AREA |DATA|,CODE,READONLY
ENTRY

LDR R13,=0x1000
BL Ledlamp
END
Total
0
Shares
Share 0
Tweet 0
Pin it 0
Brandon

Previous Article
  • Code

嵌入式程序设计基础(ARM9)

  • November 28, 2020
  • Brandon
View Post
Next Article
  • Code

Linux shell常用指令

  • December 6, 2020
  • Brandon
View Post
You May Also Like
View Post
  • Code

WordPress 后台任务利器:使用 BGRunner 构建可靠的异步处理

  • Brandon
  • December 14, 2025
View Post
  • Code

WordPress image offload

  • Brandon
  • December 14, 2025
View Post
  • Code

ComfyUI应用手册

  • Brandon
  • December 6, 2025
View Post
  • Code

Leetcode Java常用代码

  • Brandon
  • February 17, 2024
View Post
  • Code

Golang入门

  • Brandon
  • February 4, 2024
View Post
  • Code

Setting Up and Maintaining a Ubuntu Environment for My Home Server

  • Brandon
  • November 24, 2023
View Post
  • Code

Swift Learning Log

  • Brandon
  • August 31, 2023
View Post
  • Code

English Learning – Food Related

  • Brandon
  • August 31, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Fullstar

Input your search keywords and press Enter.