e200 broken in 21.6.x Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: e200 broken in 21.6.x

Post by Giovanni »

This is interesting: https://community.nxp.com/t5/MPC5xxx/Wh ... d-p/922748

Perhaps creating a stub would be sufficient, initializations are already done in startups.

Giovanni
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: e200 broken in 21.6.x

Post by mobyfab »

it seems like creating an __eabi() or __init() stub works

Giving this a try...

Code: Select all

--- extracted/gcc-4.9.4/libgcc/config/rs6000/t-e200.bkp 2021-09-26 23:45:07.848720330 +0200
+++ extracted/gcc-4.9.4/libgcc/config/rs6000/t-e200     2021-09-26 23:45:17.532808552 +0200
@@ -18,12 +18,3 @@
 
 # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and
 # end labels to all of the special sections used when we link using gcc.
-
-# Assemble startup files.
-ecrti$(objext): $(srcdir)/config/rs6000/eabivle-ci.S
-       $(crt_compile) -c $<
-
-ecrtn$(objext): $(srcdir)/config/rs6000/eabivle-cn.S
-       $(crt_compile) -c $<
-
-     


btw, toolchain documentation is available here: https://www.nxp.com/docs/en/release-not ... 1-2-RN.pdf
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: e200 broken in 21.6.x

Post by mobyfab »

okay, so copying these 2 eabivle-c*.S files and compiling them with the demo works.

They are also compiled with GCC and placed in lib/gcc/powerpc-eabivle/4.9.4/ecrt*.o
I'm trying to figure out why they are ignored...

One option would be to add them to libgcc.a
Another would be to explicitly link with them.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: e200 broken in 21.6.x

Post by Giovanni »

Probably they are not included because the application does not use the default startup files, our custom startups should export __eabi() and/or __init() equivalents I suppose.

Giovanni
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: e200 broken in 21.6.x

Post by mobyfab »

yes, a stub void __eabi() {}; does the job as well :)

I've updated the script to use newer versions where possible, so far so good but I have no hardware to test it.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: e200 broken in 21.6.x

Post by Giovanni »

Added the stub to startup files, closing.

Giovanni
Post Reply