russhughes / gc9a01_mpy

Fast MicroPython driver for GC9A01 display modules written in C
Other
147 stars 31 forks source link

compile error #34

Open mattjamo opened 7 months ago

mattjamo commented 7 months ago

Looking for some help with a compiling error for not liking STATIC. I'm going to be verbose just to see where I may have gone wrong.

I'm compiling using Windows 11 Pro using the following installation:

repos pulled to C:\Repos\gc9a01_mpy, C:\Repos\micropython, C:\Repos\btstack

wsl install sudo apt update sudo apt install gcc g++ make cmake sudo apt-get install gcc-arm-none-eabi

vi ~/.bashrc add line: export PICO_BTSTACK_PATH=/mnt/c/Repos/btstack

cd /mnt/c/Repos/micropython make -C micropython/mpy-cross

cd micropython/ports/rp2

make BOARD=RPI_PICO FROZEN_MANIFEST=../../../../gc9a01_mpy/manifest.py USER_C_MODULES=../../../gc9a01_mpy/src/micropython.cmake submodules clean all

Clean build gets to about 74% and then we see a few different errors starting with not liking the STATIC keyword.

Error:

STATIC mp_obj_t gc9a01_GC9A01_init(mp_obj_t self_in); this line is causeing /mnt/c/Repos/gc9a01_mpy/src/gc9a01.c:173:1: error: unknown type name 'STATIC' 173 | STATIC mp_obj_t gc9a01_GC9A01_init(mp_obj_t self_in);

Without cleaning we see:

[ 5%] Building C object CMakeFiles/firmware.dir/mnt/c/Repos/gc9a01_mpy/src/gc9a01.c.obj /mnt/c/Repos/gc9a01_mpy/src/gc9a01.c:176:7: error: expected ';' before 'void' 176 | STATIC void gc9a01_GC9A01_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { | ^~~~~ | ;

/mnt/c/Repos/gc9a01_mpy/src/gc9a01.c:402:1: error: unknown type name 'STATIC' 402 | STATIC mp_obj_t gc9a01_GC9A01_hard_reset(mp_obj_t self_in) { | ^~

mattjamo commented 7 months ago

@russhughes posted https://github.com/micropython/micropython/commit/decf8e6a8bb940d5829ca3296790631fcece7b21 to discussion thread