Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 4: arm-none-eabi-ld -T linkscript.ld -o cenv.elf startup.o cstart.o #24

Open
Jayzown opened this issue Jan 18, 2023 · 2 comments

Comments

@Jayzown
Copy link

Jayzown commented Jan 18, 2023

I have tried running this line of code and keep getting the error:
arm-none-eabi-ld:linkscript.ld:0: syntax error

I have this for my linkscript.ld file
ENTRY(_Reset)
MEMORY
{
ROM (rx) : ORIGIN = 0X60000000, LENGTH 1M
RAM (rwx): ORIGIN = 0X70000000, LENGTH 32M
}
SECTIONS
1 .text : {
2 startup.o (.vector_table)
3 *(.text)
4 *(.rodata)
5 } > ROM
6 _text_end = .;
7 .data : AT(ADDR(.text) + SIZEOF(.text))
8 {
9 _data_start = .;
10 *(.data)
11 . = ALIGN(8);
12 _data_end = .;
13 } > RAM
14 .bss : {
15 _bss_start = .;
16 *(.bss)
17 . = ALIGN(8);
18 _bss_end = .;
19 } > RAM

Please what could be the problem? I have searched online and can't find the issue

@Jayzown
Copy link
Author

Jayzown commented Jan 21, 2023

Hey @umanovskis , I am sorry. I copied that from my page and didn't take the numbers out. I didn't include the numbers in the code, the numbers to the lines just come with it when you copy

@uc-mani
Copy link

uc-mani commented Sep 30, 2024

You MEMORY region is missing "=" sign for LENGTH
correct code snippet is

MEMORY
{
    ROM (rx) : ORIGIN = 0x60000000, LENGTH = 1M
    RAM (rwx): ORIGIN = 0x70000000, LENGTH = 32M
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants