Description
This is a weird one. I've pared this down to as simple of a compile example as I can give you, and it's not the simplest.
If you try to compile test.c, you get:
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2025 Total Spectrum Software Inc. and contributors
Version 7.2.1-HEAD-v7.2.1 Compiled on: Apr 28 2025
checksum.h:37: error: syntax error, unexpected '{', expecting ',' or ';'
test.c
child process exited abnormally
Finished at Wed Apr 30 14:50:43 2025```
as it chokes on an inline function.
However if you try to compile mavlink.h you instead get:
```"/home/user/flexprop/bin/bin/flexspin" -2 -Dd -l --tabs=8 -D_BAUD=230400 -O1 --charset=utf8 -I "/home/user/flexprop/bin/include" "/home/user/Documents/mavlink simple example/mavlink/common/mavlink.h"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2025 Total Spectrum Software Inc. and contributors
Version 7.2.1-HEAD-v7.2.1 Compiled on: Apr 28 2025
mavlink_conversions.h:45: error: syntax error, unexpected constant
mavlink.h
child process exited abnormally
Finished at Wed Apr 30 14:51:54 2025```
Which is deeper.
Weirder still, if I try to compile mavlink_conversions.h on its own, we get:
```"/home/user/flexprop/bin/bin/flexspin" -2 -Dd -l --tabs=8 -D_BAUD=230400 -O1 --charset=utf8 -I "/home/user/flexprop/bin/include" "/home/user/PX4/PX4-Autopilot/src/modules/mavlink/mavlink/mavlink_conversions.h"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2025 Total Spectrum Software Inc. and contributors
Version 7.2.1-HEAD-v7.2.1 Compiled on: Apr 28 2025
/home/user/PX4/PX4-Autopilot/src/modules/mavlink/mavlink/mavlink_conversions.h:41: error: syntax error, unexpected '{', expecting ',' or ';'
mavlink_conversions.h
child process exited abnormally
Finished at Wed Apr 30 14:52:19 2025```
Erroring out on an inline function again.
But if we try to compile mavlink_helpers.h, we get:
"/home/user/flexprop/bin/bin/flexspin" -2 -Dd -l --tabs=8 -D_BAUD=230400 -O1 --charset=utf8 -I "/home/user/flexprop/bin/include" "/home/user/Documents/mavlink simple example/mavlink/mavlink_helpers.h"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2025 Total Spectrum Software Inc. and contributors
Version 7.2.1-HEAD-v7.2.1 Compiled on: Apr 28 2025
mavlink_conversions.h:41: error: syntax error, unexpected '{', expecting ',' or ';'
mavlink_helpers.h
child process exited abnormally
Finished at Wed Apr 30 14:52:54 2025```
same thing...so we comment out mavlink_conversions.h just to see what it does and...
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2025 Total Spectrum Software Inc. and contributors
Version 7.2.1-HEAD-v7.2.1 Compiled on: Apr 28 2025
error: could not find function main
mavlink_helpers.h
memcpy.c
child process exited abnormally
Finished at Wed Apr 30 14:53:11 2025```
The preprocessor stage WORKS. It doesn't have issues with the inlines in checksum.h.
Do you have ANY idea what's going on here, because this is a pretty serious inconsistency. It seems overall like inline functions are (and should be, per your documentation) supported, but when we're including multiple files the preprocessor breaks down quite badly.
I have spent about a day trying to determine if it was just multiple inclusion (it isn't, as far as I can tell).
Also, is there anything I have to do to get --verbose to give me any information here? It doesn't seem to do anything.
[mavlink simple example.zip](https://github.com/user-attachments/files/19984813/mavlink.simple.example.zip)