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

Compiling bootloader TRISCCLR and LATCCLR undeclared #51

Open
Rotario opened this issue Mar 15, 2020 · 5 comments
Open

Compiling bootloader TRISCCLR and LATCCLR undeclared #51

Rotario opened this issue Mar 15, 2020 · 5 comments

Comments

@Rotario
Copy link

Rotario commented Mar 15, 2020

Hi all,
Using Mplab X IDE v5.3 and latest XC32 compiler with optimisations enabled on ubuntu, just downloading the git repo and trying to clean and build the Majenko ds mini configuration I get the following errors
1.
Assembler error Expression out of range on line 268 of crt0.S

266 _dinit_end:
267 addu SRC,3
268 addiu LEN,$0,0xFFFFFFFC

TRISCCLR undeclared in BoardConfig.h in the following line
#define EnableBootLED() (CAT_3(TRIS,BLedLat,CLR) = (1 << BLedBit))

and LATCCLR undeclared as well

I assume these are macros to control the pin input/output state? Why aren't they declared? am I missing plib or something?

Thanks in advance!

@cb88
Copy link

cb88 commented Feb 16, 2022

Not sure how this worked either as I get the same error for addui... pic32 has 16bit immediates, maybe the older assembler had a 32bit immediate pseudo instruction...

I suppose until these issues are fixed or worked around try an older version of XC32.

@majenkotech
Copy link
Member

Personally I always compile using the Makefile not MPLAB-X and use pic32-tools instead of XC32. Works every time then.

@cb88
Copy link

cb88 commented Feb 16, 2022

That makes sense, I can also confirm that downloading XC32 1.44 from microchip's download archive also works after you select it in the project configuration. I am a bit curious if that is actually what is happening though with the ADDUI instruction.

@majenkotech
Copy link
Member

ADDIU should be used with a 16 bit immediate, which is sign extended to 32 bits. 0xFFFFFFFC should actually be 0xFFFC, so the complaining is correct.

@cb88
Copy link

cb88 commented Feb 16, 2022

I did test that earlier and it does compile but I wasn't sure if it was sign extending or not...

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

3 participants