Skip to content

Online compiler error for the Realtek RTL8195AM board #102

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

Closed
gggekov opened this issue Dec 8, 2017 · 12 comments
Closed

Online compiler error for the Realtek RTL8195AM board #102

gggekov opened this issue Dec 8, 2017 · 12 comments

Comments

@gggekov
Copy link

gggekov commented Dec 8, 2017

I'm unable to compile blinky in the online compiler for the Realtek RTL8195AM board. I'm on the mbed-os-5.7.0-oob branch. I'm getting Error L6236E. See the screenshot for the complete error message
image

Can you please fix this issue?

Regards,
George

@MarceloSalazar
Copy link
Contributor

@theotherjimmy

@theotherjimmy
Copy link
Contributor

I have only seen this happen when the linker garbage collected ALL code. The fact that you have a linker script implies that you have mbed-os, so I don't know what else to try here.

@gggekov
Copy link
Author

gggekov commented Dec 8, 2017

It compiles fine with ARM in mbed cli. There should be a way to compile it correctly in the online IDE as well.

@adbridge
Copy link
Contributor

@theotherjimmy what is the status of this ? Do we think it is a real problem in the tools that may need to be a known issue ?

@theotherjimmy
Copy link
Contributor

@adbridge The online compiler adds the target name between the basename and the extension of the file, that is:

line-edness Source Obj. file
offline mbed_retarget.cpp mbed_retarget.o
online mbed_retarget.cpp mbed_retarget.RTL8195AM.o

The Realtek scatter file includes a match for a specific object file with the format *<filename>.o, and will not match in the online compiler. This is where the link to main is contained, and a lack of a link to main allows the linker to garbage collect all of the user program and mbed OS. Then you get a message about no sections first or last.

This target has not ever worked in the online compiler due to this issue. We could change the workings of the scatter file or we could adopt a naming scheme for object files that matches the naming scheme offline.

@samchuarm
Copy link

@ARMmbed/team-realtek

@adbridge
Copy link
Contributor

@theotherjimmy @samchuarm If this has never worked in the online compiler it shouldn't even have mbed enabled status.... This should be removed until it is fixed

@tung7970
Copy link

tung7970 commented Dec 15, 2017

@theotherjimmy @ARMmbed/team-realtek The quick fix is to rewrite the match condition from

*<filename>.o to *<filename>*.o
e.g.
*rtl8195a_init.o (+RO) => *rtl8195a_init*.o (+RO)

Then, the scatter file should work for both online and offline compilers.

@yangkunming99
Copy link

@tung7970, thanks for the comment. Is there any way we can force FIRST in c file instead of scatter file?

@Archcady
Copy link

Hello @samchuarm can I send you the changes for the online compiler once and when you confirm it is working, ill raise a PR immediately?

@tung7970
Copy link

@yangkunming99 Unfortunately, placement is determined by linker.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 28, 2018

Hi, this should be resolved via referenced PR above (see mbed-os issue 5626)

@0xc0170 0xc0170 closed this as completed Mar 28, 2018
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

9 participants