-
Notifications
You must be signed in to change notification settings - Fork 6
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
build error: 'BODPD_SAMPLED_gc' undeclared #41
Comments
Yeah unfortunately they renamed that symbol at some point. If you can figure out an easy way to distinguish headers with the bodpd symbols from the ones with the old ones I'll happily put in a happy What environment are you building in? |
It's recent ArchLinux with gcc 13.1.1 20230429 I was able to fix it enough to build hdk2 and hdk2svr (which one should I use?) and soem other by 'make all'. I've called:
Resulting in:
As I stated 'make all' passes, building firmwaress
|
Use hdk2svr, the other one only exists because Razer required it years ago. It's the worse choice. you'll note I recently committed the patch that "caused" this issue, to fix builds on Debian. You should just be able to revert that commit. |
Thanks for answer about hdk2svr. But I think I will forget about it in next few years, and after not finding answer in README.md I will ask about it again ;-) If some distro do something in stupid way, it shouldn't be like that that we brake every other distro because of that ;-) |
it's like that in the most recent upstream, it's not that a distro broke anything. The enum was just renamed to a more clear thing. |
Sounds strange, because ArchLinux is usually recent vanilla upstream, while Debian is outdated and heavily patched. But where does this enums come from? (I guess I've got something outdated in my system then ;-) |
avr-libc. I think the problem is there is two upstreams: one open source git repo, and one from Atmel. I'd really like to avoid having to write effectively a configure script in makefile, so if there's a way to distinguish them by preprocessor I'd be super interested. |
Any quick fix to make it work with Atmel Studio7 (win10)? |
you just switch between the two different enum names for the brownout detector "sampled" setting. |
[HDK_20][-O3] ../src/Boot.c : HDK_20/src/Boot.o
In file included from ../src/ASF/common/services/ioport/ioport.h:121,
from ../src/Boot.c:10:
In function 'arch_ioport_set_pin_dir',
inlined from 'ioport_set_pin_dir' at ../src/ASF/common/services/ioport/ioport.h:266:5,
inlined from 'CheckForBootloaderSwitchOnStartup' at ../src/Boot.c:40:3:
../src/ASF/common/services/ioport/xmega/ioport.h:262:22: warning: array subscript 0 is outside array bounds of 'PORT_t[0]' {aka 'struct PORT_struct[]'} [-Warray-bounds]
262 | base->DIRSET = arch_ioport_pin_to_mask(pin);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'PrepareForSoftwareUpgrade',
inlined from 'CheckForBootloaderSwitchOnStartup' at ../src/Boot.c:43:3:
../src/Boot.c:56:14: warning: array subscript 0 is outside array bounds of 'PORT_t[0]' {aka 'struct PORT_struct[]'} [-Warray-bounds]
56 | PORTD.INTCTRL &= ~PORT_INT0LVL0_bm; // Disable PORT D Interrupt
| ^
../src/Boot.c:56:23: warning: array subscript 0 is outside array bounds of 'PORT_t[0]' {aka 'struct PORT_struct[]'} [-Warray-bounds]
56 | PORTD.INTCTRL &= ~PORT_INT0LVL0_bm; // Disable PORT D Interrupt
| ^
[HDK_20][-O3] ../src/Console.c : HDK_20/src/Console.o
[HDK_20][-O3] ../src/FPGA.c : HDK_20/src/FPGA.o
[HDK_20][-O3] ../src/SerialStateMachine.c : HDK_20/src/SerialStateMachine.o
../src/SerialStateMachine.c: In function 'getBODStatusInPD':
../src/SerialStateMachine.c:1637:14: error: 'BODPD_SAMPLED_gc' undeclared (first use in this function); did you mean 'BOD_SAMPLED_gc'?
1637 | case BODPD_SAMPLED_gc:
| ^~~~~~~~~~~~~~~~
| BOD_SAMPLED_gc
../src/SerialStateMachine.c:1637:14: note: each undeclared identifier is reported only once for each function it appears in
../src/SerialStateMachine.c:1639:14: error: 'BODPD_CONTINUOUS_gc' undeclared (first use in this function); did you mean 'BOD_CONTINUOUS_gc'?
1639 | case BODPD_CONTINUOUS_gc:
| ^~~~~~~~~~~~~~~~~~~
| BOD_CONTINUOUS_gc
../src/SerialStateMachine.c:1641:14: error: 'BODPD_DISABLED_gc' undeclared (first use in this function); did you mean 'BOD_DISABLED_gc'?
1641 | case BODPD_DISABLED_gc:
| ^~~~~~~~~~~~~~~~~
| BOD_DISABLED_gc
make: *** [add_variant.mk:54: HDK_20/src/SerialStateMachine.o] Error 1
The text was updated successfully, but these errors were encountered: