AloyseTech / PHY6202_GCC

An experimental port of the PhyPlusInc PHY6202 SDK from ARMCC to GCC
5 stars 4 forks source link

Need Help with the example port. #1

Open kartikmugiwara opened 2 years ago

kartikmugiwara commented 2 years ago

Hello, I am working on AI-thinker's PB03F module and it uses PHY6252 inside. THey have provided the SDK for the same but it is designed to be compiled on Keil but I wanted to convert them to GCC. I tried compiling your gpio project to gain an idea regarding the same but I am getting the following linker error: image

Can you please help me with this?

biemster commented 2 years ago

I've had the same issue with a PHY62XX clone, the Lenze 17h66. I was talking to myself about it here: https://github.com/biemster/st17h66_FindMy/issues/1#issuecomment-1210590288

Long story short, the patch.o ELF has the wrong sh_info value, which makes readelf write a warning to stderr, which makes uVision treat it as an error. Workaround there is to patch the patch.o with a hex editor to have the correct value for sh_info. However, you'll next get to a conflicting CPU architecture 12/0 error, which I tried to fix by compiling patch.c from source. I got a few steps further, but not to a fully working makefile yet. We can discuss further if you are still interested.

biemster commented 1 year ago

In case more people end up here, while this project seems to be inactive, compiling a working blinky using GCC for these chips can be found here: https://github.com/biemster/st17h66_blinky