Operand Out of Range Error when Compiling ChipKIT-Bootloader #489
-
Hello, I've been trying to compile the chipKIT-Bootloaders project on MPLAB X. I am only interested in one configuration which is UDB32_MX2_DIP. When I try to compile it, MPLAB gives me the following error: ../crt0.S: Assembler messages: The main thing I am trying to accomplish is that I am trying to reverse the RX and TX pin on the UART for bootloading the code and for that I need to change re assign the RX and TX pins, and generate hex file. Is there a way to surpass this error? PS: I also posted the same question [here], I don't know which platform is the best for this discussion, but I close it if needed. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
I recently built a chipKIT bootloader for the PONTECH QUICK240 without issue. You need to lease or own the XC32 compiler, it will not build without a license. I believe there are several bootloader projects and the latest is the one listed below. REPO: https://github.com/chipKIT32/PIC32-avrdude-bootloader.git |
Beta Was this translation helpful? Give feedback.
-
The problem here is that the compiler is more strict in newer versions about operands to 16 bit operations. The instruction, as written, has a 32-bit operand to a 16 bit instruction ( The best fix is to simply truncate the operand (which is what the compiler used to do) by lopping off the first for F's.
There will probably be other instances of the same thing though once that one line has been fixed... Personally I would recommend compiling using the chipKIT compiler not XC32, and doing it under Linux using the included Makefile. |
Beta Was this translation helpful? Give feedback.
-
I have pushed a potential fix to the repo. Update and try compiling again (note: I never use XC32 so don't have it set up for testing...) |
Beta Was this translation helpful? Give feedback.
-
Sure, if you can drop the UARTMapRX and UARTMapTX entries on here to save me hunting through the datasheet for the right values I can do that for you. |
Beta Was this translation helpful? Give feedback.
-
Yeah they're not a complete all:all matrix - only select pins can do select functions. There's no UART RX functionality on B3, and no UART TX functionality on B13. Time for a re-think? |
Beta Was this translation helpful? Give feedback.
Yeah they're not a complete all:all matrix - only select pins can do select functions. There's no UART RX functionality on B3, and no UART TX functionality on B13. Time for a re-think?