-
Notifications
You must be signed in to change notification settings - Fork 961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add experimental GCC ARM toolchain #678
Conversation
@0xc0170 Do you have any idea that the gccarm firmware shows an empty disk? Which part of code is related? |
@xiongyihui you might want to check all msc related codes in source/usb. |
I figured out the issue. It is that |
It seem armcc uses much less RAM and Flash than gccarm. LPC11U35 doesn't have enough to run the interface firmware compiled with gccarm, even if without RTX RTOS. |
See the latest on #197. I'm almost done with the official port to gcc. Very unfortunately coincidental timing between us! 😔 I do very much appreciate your collaborative interest and effort. If you'd like to help test my gcc port, this would be appreciated. |
I see. I will test that. |
@@ -53,6 +53,9 @@ module: | |||
hic_lpc11u35: &module_hic_lpc11u35 | |||
- records/rtos/rtos-cm0.yaml | |||
- records/hic_hal/lpc11u35.yaml | |||
hic_lpc11u35_bm: &module_hic_lpc11u35_bm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As these might not be related to GCC port, please send t hem separately or after GCC support lands on master.
@xiongyihui Thanks for the effort ! Please review and test https://github.com/flit/DAPLink/tree/feature/gcc |
To support GCC ARM toolchain:
convert some attributes
__weak
to__attribute__((weak))
__forceinline
toinline __attribute__((always_inline))
__packed
to__attribute__((__packed__))
, also need to change its location, for exampleconvert
__packed struct { char a; int b; } c;
tostruct __attribute__((__packed__)) { char a; int b; } c;
.it is used by USB stack
wide character array defined by
L"a wide string"
By default, gcc uses 4 bytes to store a wide char, while armcc uses 2 bytes. In order to be compatible with armcc, add
-fshort-wchar
to gcc compiler flags.convert asm code
Right now, it work partially. To test it.