PIC32 linker errors

[moved from private email] I am having linker problem in porting PIC32, but I do not have that problem with PIC24.   I am wondering if the code size is the problem, since the free C32 compiler has 64kB limit, but I think that should be enough for the demo project.   Here is the error message, do you have an idea of what causing it? [binary snipped]

PIC32 linker errors

Is the demo you are compiling the one from the V4.6.1 FreeRTOS.org zip file?  Did you make any changes to it? The error messages look like there is a linker script problem.  I don’t think it is anything to do with the code size limit on the compiler as I would image you would get a straight forward about this were this the case, rather than the linker warnings.  Having said that, I’m not sure if the compiler I have is code size limited or not. I have tried to gauge the size of the output using pic32-size and pic32-objcopy, but with no success so far.  I will try this again when I get the chance.  In the mean time, if you are using the ‘official’ port, can you try turning the compiler optimization to ‘s’.  The demo runs at all optimisation levels.  It will be interesting to see if the linker problem persists. Regards.

PIC32 linker errors

>I have tried to gauge the size of the output using pic32-size and pic32-objcopy, but with no success so far Looks like I was trying to do this the hard way.  MPLAB is telling me the program size is approx 12K with 0 optimisation and approx 10K with s optimisation. Regards.

PIC32 linker errors

When you download the C32 compiler you get a 16K version which you then have to upgrade to the 64K version.  Did you do this upgrade? Regards.

PIC32 linker errors

I just answer your questions below. Is the demo you are compiling the one from the V4.6.1 FreeRTOS.org zip file? Did you make any changes to it? Yes, it is, no, nothing is changed. The error messages look like there is a linker script problem. I don’t think it is anything to do with the code size limit on the compiler as I would image you would get a straight forward about this were this the case, rather than the linker warnings. Having said that, I’m not sure if the compiler I have is code size limited or not. You are right, After I play around the settings, I finally got the code built. I found out, 11k code space, but data memory is nearly full, 31k something like that. But, After I downloaded that code to the target board, never work, nothing happens, so I guess I ddi not build the code right, something is wrong. Under PIC32 linker section, I checked the "removed unused sections" to get code built, but code is not functioning. I have tried to gauge the size of the output using pic32-size and pic32-objcopy, but with no success so far. I will try this again when I get the chance. In the mean time, if you are using the ‘official’ port, can you try turning the compiler optimization to ‘s’. The demo runs at all optimisation levels. It will be interesting to see if the linker problem persists. Let me find out how to do so.

PIC32 linker errors

I did, I have 64kB, also the code size is even than 16KB.

PIC32 linker errors

I got it working, I unchecked"removed unused section". and I saw the flashes and characters on LCD.