Jump to content


Photo

-Idx Num Command Line Error

array index limit

3 replies to this topic

#1 Badejavu

Badejavu

    Regular

  • EstablishedMember
  • Pip
  • 27 posts
  • Gender:Male

Posted 17 February 2014 - 07:35 PM

Hi,

 

I use Boost C for PIC18 version 7.04 with a PIC18F67K22(128K FLASH, 4K SRAM).

 

Question:

1.    Is it possible to declare an array of integers with and index of over 256?
 

         e.g unsigned short Array[340];

 

2. I used  -idx 2  command in the build options, to increase the array index limit and I still get an error.

 

       Error: Array index size does not match linker '-idx' option. Expected:1 byte(s), while array index size of 2 byte(s) used in File: 'C:/Users/

 

Is there a way to use array index greater than 256?

 

Thanks

Bade



#2 davidb

davidb

    Enthusiast

  • EstablishedMember
  • PipPip
  • 134 posts
  • Location:Essex, UK

Posted 18 February 2014 - 09:17 AM

Bade,

 

The error message tells you that the Linker needs the -idx2 option as well!

 

Also, probably wise to upgrade to V7.21.

 

Regards

 

davidb


Edited by davidb, 18 February 2014 - 09:18 AM.


#3 Badejavu

Badejavu

    Regular

  • EstablishedMember
  • Pip
  • 27 posts
  • Gender:Male

Posted 18 February 2014 - 11:47 AM

Thanks Davidb for your time.

 

As you suggested, I have upgraded to V7.21 and also included the -idx 2 command option for both the linker and the compiler options. It initially shows success, but comes up with numerous errors shortly after, I have pasted a few of the errors:

 

success

Executing: "C:\Program Files (x86)\SourceBoost721\SourceBoost\boostlink_picmicro.exe"  "C:\Users\BAdegoke\Desktop\MXproj\Main.obj" "C:\Program Files (x86)\SourceBoost\Lib\libc.pic18.lib" "C:\Program Files (x86)\SourceBoost\Lib\float.pic18.lib" "C:\Program Files (x86)\SourceBoost\Lib\eeprom.pic18.lib" -O1  -p "Pd" -t 18F67K22 -idx 2
BoostLink Optimizing Linker Version 7.21
Copyright© 2004-2013 Pavel Baranov
Copyright© 2004-2013 David Hobday
 
 
Optimisation level:1
Error: Unresolved external function:'float32_mul(float,float)'
Error: Unresolved external function:'float32_mul(float,float)'
Error: Unresolved external function:'float32_mul(float,float)'
Error: Unresolved external function:'eeprom_read(unsigned char)'
Error: Unresolved external function:'eeprom_read(unsigned char)'
Error: Unresolved external function:'__div_32_32(unsigned long,unsigned long)'
 
failure
Link step failed.
BUILD FAILED: Tue Feb 18 11:20:27 2014
 
 
 
I use the "float.pic18.lib" and "eeprom.pic18.lib" in my project and it has not shown an error related to these libraries prior to now. The -idx 2 command has caused this. Any suggestions? What do I do now ?
 
Thanks 
Bade

 

 

 

 

 

 

 

 



#4 davidb

davidb

    Enthusiast

  • EstablishedMember
  • PipPip
  • 134 posts
  • Location:Essex, UK

Posted 18 February 2014 - 09:32 PM

Bade,

 

Use the required library files from the 'SourceBoost\Lib\large' folder rather than those in the 'SourceBoost\Lib' folder.

 

Unfortunately the documentation for the use of the various library files seems to be somewhat lacking.

 

Regards

 

davidb





Reply to this topic



  



Also tagged with one or more of these keywords: array, index, limit

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users