Builtin makefile rules in circuitpython

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
EmergReanimator
 
Posts: 8
Joined: Tue May 18, 2021 8:26 am

Builtin makefile rules in circuitpython

Post by EmergReanimator »

I faced some wierd buid issue while porting circuitpython to LPC55S28.
NXP offers https://github.com/NXPmicro/mcux-sdk. There are two files in the same directory where handlers of exception vectors are bundled:
devices/LPC5528/mcuxpresso/startup_lpc5528.c
devices/LPC5528/mcuxpresso/startup_lpc5528.cpp

The issue is that despite of explicitly adding startup_lpc5528.c to SRC_C variable, make is guessing which file to built due to built-in rules.
As result make tool to compiles C++ version startup_lpc5528.cpp instead of startup_lpc5528.c and fails on linkage stage due to missing C declaration;

I don't have better idea rather than creating own copy of startup code.

Any hints and recommendations in this respect are welcome!

User avatar
tannewt
 
Posts: 3298
Joined: Thu Oct 06, 2016 8:48 pm

Re: Builtin makefile rules in circuitpython

Post by tannewt »

Ya, the makefile rules are weird. The simplest thing is to copy the file elsewhere and target it instead.

The discord is a good place to ask questions like this. We have a #circuitpython-dev channel on https://adafru.it/discord

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”