Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing registers/interrupts
04-06-2015, 11:30 AM, (This post was last modified: 04-06-2015, 11:31 AM by regis.)
#20
RE: Accessing registers/interrupts
Here is what I get :

/usr/bin/../lib/gcc/mips-elf/4.9.2/../../../../mips-elf/bin/ld: region `kseg0_program_mem' overflowed by 628 bytes


The program is simply to big for your PIC32MX220 because the HID bootloader, the CDC library and the printf function are quite big.
You can't do anything about the bootloader but you could try to use Serial instead of CDC and print/printNumber instead of printf.
For example, if I replace :

CDC.printf("Pic address: 0x%X \r\n", I2C2ADD);


with :

CDC.print("Pic address: 0x");
CDC.printNumber(I2C2ADD, HEX);
CDC.print("\r\n");

I don't have any error anymore and the code size is 14268 / 16368 bytes (87% used).

If I now replace CDC with Serial then the code size is 9052 / 16368 bytes (55% used).

Last, if I compile the code with MIPS16 option, Serial and print/printNumber functions I get : 6792 / 16368 bytes (41% used).

Now you have 10K free Smile .
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Messages In This Thread
Accessing registers/interrupts - by Dobby_ - 29-03-2015, 04:10 PM
RE: Accessing registers/interrupts - by pingotg - 29-03-2015, 09:20 PM
RE: Accessing registers/interrupts - by Dobby_ - 30-03-2015, 07:44 PM
RE: Accessing registers/interrupts - by pingotg - 31-03-2015, 05:03 PM
RE: Accessing registers/interrupts - by moreno - 31-03-2015, 06:11 PM
RE: Accessing registers/interrupts - by Dobby_ - 31-03-2015, 08:15 PM
RE: Accessing registers/interrupts - by moreno - 31-03-2015, 09:33 PM
RE: Accessing registers/interrupts - by joel - 01-04-2015, 06:54 PM
RE: Accessing registers/interrupts - by Dobby_ - 01-04-2015, 10:03 PM
RE: Accessing registers/interrupts - by Dobby_ - 01-04-2015, 08:57 PM
RE: Accessing registers/interrupts - by joel - 02-04-2015, 10:42 AM
RE: Accessing registers/interrupts - by Dobby_ - 02-04-2015, 09:22 PM
RE: Accessing registers/interrupts - by pingotg - 02-04-2015, 10:15 PM
RE: Accessing registers/interrupts - by Dobby_ - 07-04-2015, 10:09 PM
RE: Accessing registers/interrupts - by Dobby_ - 25-05-2015, 11:38 AM
RE: Accessing registers/interrupts - by regis - 28-05-2015, 09:42 AM
RE: Accessing registers/interrupts - by Dobby_ - 30-05-2015, 12:31 PM
RE: Accessing registers/interrupts - by regis - 01-06-2015, 12:40 PM
RE: Accessing registers/interrupts - by Dobby_ - 04-06-2015, 08:42 AM
RE: Accessing registers/interrupts - by regis - 04-06-2015, 11:30 AM
RE: Accessing registers/interrupts - by Dobby_ - 04-06-2015, 06:09 PM
RE: Accessing registers/interrupts - by regis - 08-06-2015, 12:31 PM
RE: Accessing registers/interrupts - by Dobby_ - 13-06-2015, 05:55 PM
RE: Accessing registers/interrupts - by regis - 13-06-2015, 06:15 PM
RE: Accessing registers/interrupts - by Dobby_ - 13-06-2015, 09:59 PM
RE: Accessing registers/interrupts - by fpeixeiro - 29-09-2016, 04:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)