Closed miri64 closed 7 years ago
(The samd21 error was actually caused by an update to newlib ;-))
The various adc.c
use an illegal array definition: static const uint8_t adc_config[] = {};
. GCC and Clang seem ignores this unless you actually subscript this array in your code.
Proposed fix:
#ifdef ADC_CONFIG
static const uint8_t adc_config[] = ADC_CONFIG;
int adc_sample(adc_t line, adc_res_t res)
{
…
}
#else
int adc_sample(adc_t line, adc_res_t res)
{
(void) line, (void) res;
return -1;
}
#endif
I guess just excluding the code when #if !ADC_NUMOF
would be the way to go ;-)
You're right. An error message at link-time could be considered more useful than odd errors at runtime. :)
I will keep this issue in mind during the summer and fix this in steps, any patches are welcome.
Please reference this issue number (#5519) for any PRs that fix anything related to GCC-6.
I am currently building a GCC 6 toolchain on my system and can test any PRs related to this.
I'll add a note to the README to avoid new users being confused.
Reopening because lpc2387 fails with current release of GCC-6 (arm-none-eabi-gcc-6.1.0)
Should be fixed in 6.2.0 (unreleased), see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70830
Building for msba2 .. failed
Building application "default" for "msba2" with MCU "lpc2387".
/tmp/ccl0WCcs.s: Assembler messages:
/tmp/ccl0WCcs.s:103: Error: push/pop do not support {reglist}^ -- `pop {r0,r1,r2,r3,ip,pc}^'
Is ARM7 even officially supported by this version?
@OlegHahm I believe it is. lpc2387 is of the family ARM7TDMI which uses the armv4t architecture which should be supported in GCC.
Thanks for the clarification.
Since this bug is being fixed in a new compiler version, I'll move it to the next release to wait for such new version, then test if it really solves this and close it.
We still have this bug?
Seems like it... I'm not sure what you meant by "new compiler version". The one on Ubuntu is currently
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
According to @gebart comment this is solved in gcc 6.2.0, but It don't know if it was already released and included to any LTS distribution.
(mine is Ubuntu 16.04 LTS ;-))
Wait... what am I talking about... this issue only effects GCC 6... so sorry about the noise... Don't know about other toolchains of other distributions either :-/
Yes it's OK, and the news say that GCC 6.2 was released, maybe we can wait for an input from @gebart if he has a way to test it in such GCC version.
There might be a new issue with GCC 6 (https://github.com/RIOT-OS/Release-Specs/issues/28) so I'm leaving this open.
I think all issues have been resolved with the most up-to-date gcc6 version.
@OlegHahm Would you mind to re-modify the README about this issue? It's one of the first things we see when we come to the repo so it can scare people...
Arch just gave me a shiny new version of GCC to play with and I got some issues building
examples/default
now:Among the boards failing are some of our most important ones. Here's a collection of a few errors I managed to identify:
Obvious workaround for now is not to update, but for the future I think it's beneficial (also with #1121 in mind) to fix those warnings.