Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PIC32 MX220] Not enough flash memory
06-11-2013, 05:50 PM,
RE: [PIC32 MX220] Not enough flash memory
Wow. So I don't really have 32 writable kibibytes?

(06-11-2013, 11:28 AM)regis Wrote:
(06-11-2013, 05:10 AM)FlacoDev Wrote: I tried writing a substitute pprint() function in __cdc.c but I'm gonna have to re-write a substitute pprints(), pprintc(), etc...
Take a look at liblcd.c and you won't have to reinvent the wheel.
The best would be to write an apart library with print, printFloat, printNumber, ... that could be used with lcdlib.c, __cdc.c, serial.c, etc ...

I'm gonna take a look at that as soon as possible. Smile
Could be fun if I find the time to work on it.
06-11-2013, 06:58 PM,
RE: [PIC32 MX220] Not enough flash memory
Well, you sort of do (actually 32+3K in the CPU chip) but lots is already used Sad

I got a linker MAP file and hunted through it and also looked at the input files (procdefs.ld things) to the linker.

I haven't stumbled across where most of the 35K goes to. The bootloader I suppose but a breakdown by size & function and hints about any that might be slimmed down would be useful.

07-11-2013, 09:27 AM,
RE: [PIC32 MX220] Not enough flash memory
Sorry for interfering (and feel free to remove this posting in case it's useless), but I remember the PIC32s have some 16bit-opcode-width mode that would instantly sort-of "free" a certain percentage of flash memory (if not yet activated, of course, and depending on compiler AND program code - AND with a possible impact on execution speed, as we are speaking of different command sets). Did you re-check? Just in case ..
17-02-2014, 01:23 PM,
RE: [PIC32 MX220] Not enough flash memory

I am on OS X 10.9 and I had the same problem as you, when trying to link the CDC library to my program. After digging into the Makefiles I noticed that the code is compiled with -O3 in the Makefile32.macosx. Changing this to -Os yielded another error, which was fixed by adding "-minterlink-mips16", so I can advise you to make sure that you are optimizing your code for size, not for speed. Just take a look what flag the compiler is using and if it is not -Os, change it in the Makefile32 for your platform.

Here is an example of my current flags:

ELF_FLAGS    =    -EL -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -march=24kc\
                    -D __PIC32MX__ -D __$(PROC)__ -D $(BOARD)\
19-02-2014, 06:52 PM,
RE: [PIC32 MX220] Not enough flash memory
Thanks for this report.
These options are those the makefile32.linux use.
I fixed the makefile32.macosx and will commit a new revision very soon.
It is easier to complain than it is to do, but it is better to do than it is to complain.

Forum Jump:

Users browsing this thread: 1 Guest(s)