- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要在 8051 微 Controller 中使用代码库来容纳所有代码。 SDCC 表示支持,但我在链接步骤中遇到了问题。
我有一个包含 3 个文件的测试项目:main.c、func1.c 和bank.asm。主函数应该调用 func1(),然后进入 while 循环。但 func1() 位于不同的代码库中。
// main.c
int func1(void) banked;
void main()
{
int i = func1();
while(i)
{
}
}
// func1.c
#pragma codeseg BANK1
int func1(void) {
return 99; }
//bank.asm
.area HOME (CODE)
.area GSINIT0 (CODE)
.area GSINIT1 (CODE)
.area GSINIT2 (CODE)
.area GSINIT3 (CODE)
.area GSINIT4 (CODE)
.area GSINIT5 (CODE)
.area GSINIT (CODE)
.area GSFINAL (CODE)
.area CSEG (CODE)
.area HOME (CODE)
__sdcc_banked_call::
ret ;make the call
__sdcc_banked_ret::
ret ;return to caller
我有一个构建批处理文件来编译所有内容并将其链接在一起。
sdcc -c func1.c
sdcc -c main.c
asx8051 -ol bank.asm
sdcc "-Wl -b BANK1=0x018000" main.rel func1.rel bank.rel
我收到此链接器错误:
?ASlink-Error-Insufficient ROM/EPROM/FLASH memory.
如何获得此链接?
最佳答案
来自 SDCC 手册:
Segments may be placed anywhere in the 4 meg address space using the usual --*-loc options. Note that if any segments are located above 64K, the -r flag must be passed to the linker to generate the proper segment relocations, and the Intel HEX output format must be used. The -r flag can be passed to the linker by using the option -Wl-r on the SDCC command line. However, currently the linker can not handle code segments > 64k.
因此,将 -Wl-r 添加到链接器行。
关于embedded - SDCC 代码银行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1606926/
我需要在 8051 微 Controller 中使用代码库来容纳所有代码。 SDCC 表示支持,但我在链接步骤中遇到了问题。 我有一个包含 3 个文件的测试项目:main.c、func1.c 和ban
对于低级编程,有时需要说,在给定的内存位置,这就是我的地址所在的位置。在本文中,示例是 PIC16F886 和相关微 Controller 中的 PIR1 寄存器。它总是在地址 0x000C 处找到。
对于低级编程,有时需要说,在给定的内存位置,这就是我的地址所在的位置。在本文中,示例是 PIC16F886 和相关微 Controller 中的 PIR1 寄存器。它总是在地址 0x000C 处找到。
我正在尝试为 Crazyradio PA 编译固件(但问题并非特定于此),其中我添加了 Nordic Semiconductor 的 SDK 所需的库。 该库最初是要在 Keil µVision ID
我正在尝试将一对结构数组传递给 C 中的函数。 我必须使用 SDCC 编译器,因为我正在使用 GBDK 为 Gameboy 进行编译。 当我传递结构数组时,出现如下所示的错误,但是,如果我完全取出函数
我在ThreadCreate()中有这段代码: int tmpPSW = newThID 编辑: ThreadCreate() 的来源: // ThreadID is typedef'ed
(非母语人士,我为模糊的标题道歉) 我正在使用编译器套件 sdcc (3.7.0) 为 TI-82 STATS 编译 C 代码计算器。它的处理器是Z80。操作系统提供了几个与设备交互的函数,例如内存地
我以前使用 Keil 对 8051 微 Controller 进行编程。出于某种原因,我必须在 SDCC 中编写代码,但今天我在编译器中遇到了非常奇怪的行为。我使用的是代码块 IDE 12.11 和
我正在使用 GCC(更正)SDCC 和 Eclipse IDE 为 8051 架构嵌入式目标编译 C 代码。我需要插入几个 NOP 来计时,但我无法让编译器接受内联汇编代码。 使用 __asm__ (
当我使用 SDCC 3.1.0 运行编译此代码,并在 Amstrad CPC 464 上运行时(在仿真下,WinCPC 0.9.26 在 Wine 上运行): void _test_malloc()
我正在为 Z80 开发 C 程序并使用 SDCC 进行编译。我不知道如何为从 0x0066 开始的 NMI 中断和从 0x0038 开始的 IM1 中断创建中断处理程序。我正在使用这些电话: void
我是 C 语言编程的新手,我正在为我的 MCU 开发固件应用程序。当我使用 KEIL 编译器(Big Endian)时,此方法工作正常,但当我切换到 SDCC 编译器(Little Endian)时,
对于 LPC922 微 Controller (带有 SDCC),我想创建一个具有线性插值的查找表。假设我得到了 x 和 y 值,例如 x=300 y=10,0201 x=700 y=89,542 x
有没有办法将 Visual Studio 2010 IDE 与小型设备 C 编译器 (SDCC) 结合使用?我想在 Visual Studio 中使用 SDCC 进行编译。 最佳答案 如果你想走这条路
我已经搜索了很多天的解决方法,但没有成功。PIC 模拟器一直告诉我 hex 文件的校验和是错误的。我已经多次尝试更改 SDCC 的 hex 文件输出格式并尝试了所有这些,但所有这些都是相同的错误。 此
我们正在尝试编译我们的 C 代码,其中包括用于各种操作(定时、产生输出波形和测量输入频率)的大量汇编。 对于我们的一些 ASM 操作,我们不断收到相同的错误: “.org 在 REL 区域或指令/助记
我是一名优秀的程序员,十分优秀!