The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.2.24 (Linux)
File Line Function
/showthread.php 864 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PIC32 MX220] Not enough flash memory
04-11-2013, 02:02 AM, (This post was last modified: 04-11-2013, 02:15 AM by FlacoDev.)
#1
[PIC32 MX220] Not enough flash memory
Hello,

Once more, I have a problem...

I try to compile this code:

Code:
#define trigPin 7
#define echoPin 8

long duration;
long distance;

void setup()
{
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}

void loop()
{
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);

  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH, 1000);

  distance = duration/58.2;

  CDC.printf("%l cm\n", distance);

  delay(50);
}

And the compiler returns me:

Code:
/home/flaco/prog/X.4r912/linux/p32/bin/../lib/gcc/mips-elf/4.5.2/../../../../mips-elf/bin/ld: address 0x9d008394 of /home/flaco/prog/X.4r912/source/main32.elf section `.text' is not within region `kseg0_program_mem'

/home/flaco/prog/X.4r912/linux/p32/bin/../lib/gcc/mips-elf/4.5.2/../../../../mips-elf/bin/ld: /home/flaco/prog/X.4r912/source/main32.elf section `.rodata' will not fit in region `kseg0_program_mem'

/home/flaco/prog/X.4r912/linux/p32/bin/../lib/gcc/mips-elf/4.5.2/../../../../mips-elf/bin/ld: address 0x9d008394 of /home/flaco/prog/X.4r912/source/main32.elf section `.text' is not within region `kseg0_program_mem'

/home/flaco/prog/X.4r912/linux/p32/bin/../lib/gcc/mips-elf/4.5.2/../../../../mips-elf/bin/ld: region `kseg0_program_mem' overflowed by 1572 bytes

collect2: ld returned 1 exit status

/home/flaco/prog/X.4r912/source/Makefile32.linux:128: recipe for target 'link' failed

I have tried to compile this code by changing the board in the settings and I had no problems (with the Emperor 460).
Is my MX220 not powerful enough or something for this little code?

Note that the code is compiling if I comment the CDC.printf("%l\n", distance); line.

Thanks :)
Reply


Messages In This Thread
[PIC32 MX220] Not enough flash memory - by FlacoDev - 04-11-2013, 02:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)