Skip to content
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

Makefile not working xmega #27

Open
JosiahCochran opened this issue Jul 17, 2017 · 1 comment
Open

Makefile not working xmega #27

JosiahCochran opened this issue Jul 17, 2017 · 1 comment

Comments

@JosiahCochran
Copy link

I am trying to program the xmega128a1u with blink code. I made the changes form DDRB to PORTB.DIRSET and so on, but the makefile is having an error in compiling the code.

avr-gcc -Os -g -std=gnu99 -Wall -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -DF_CPU=8000000UL -DBAUD=9600UL -I. -I../../xmegalibrary -mmcu=atxmega128a1u -c -o blinkLED.o blinkLED.c
:0:6: error: expected identifier or ‘(’ before numeric constant
: recipe for target 'blinkLED.o' failed
make: *** [blinkLED.o] Error 1

@hexagon5un
Copy link
Owner

The XMegas are an entirely different chip, with (as you noted) a completely different set of register macros and etc. If you're going to be porting any of my Mega code to the XMega chips, just know up front that it's going to be a big challenge, and that some decent prior low-level experience with at least one, and probably both of the chips is needed -- or else you'll acquire it along the way, the hard way. :)

Still, that looks like a deeper error. What's in line 6 of blinkLED.c? Did you accidentally create a name collision with a macro that's defined in the XMega headers? Unfortunately, without having all the code at hand, it's a very tough remote debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants