Jump to content

Badejavu

EstablishedMember
  • Content count

    27
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Badejavu

  • Rank
    Regular

Profile Information

  • Gender
    Male
  1. Badejavu

    -Idx Num Command Line Error

    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 http://www.sourceboost.com 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
  2. 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
  3. Thanks Pavel. It is Mplabx that shows an error.
  4. Hi, I am using boostC with MplabX for PIC18F67K22. I have tried to : 1. Use fixed address like " int x@0x100" . This has worked for me previously in Mplab. Do I need to include any libraries to make this work in MplabX? 2. When I add an interrupt service routine as instructed in the boosC manual " void interrupt ( ) " the compiler shows error on all code lines in the isr. it does not see it as an interrupt. Is there a particular way to declare this in the MplabX environment? 3. Even when I include the "string.h" directive, the string length function "strlen(string)" is not recognised by the compiler. Hence the corresponding line is highlighted as an error. Thanks Bade I also tried including all these files below, but it still didn't work. #include <stdio.h> #include <stdlib.h> #include <system.h> #include <boostc.h> #include <BoostCPic18.h> #include "PIC18f67k22.h" #include <float.h> #include <eeprom.h> #include <string.h>
  5. Thanks Pavel, I used the pragma config and it worked….although quite lengthy Regards Badejo
  6. Hi Pavel, How do I set the CONFIG bits in MplabX using boost C. Has this been sorted out now? it gives me this error: invalid pragma DATA argument '_CONFIG1L' Regards Bade
  7. Thanks..I was hoping I could address it directly using the compiler. P.S .Your second approach(?: conditional assignment) was helpful . I just learned it, hopefully it will help me shorten other "if else" statements
  8. I am trying to send a 16bit data with MSB first over serial comm. How can I get around sending the individual bits 15-0 using the boostC compiler using the sample below e.g. SIN = data.15……SIN = data.0. void play_AUDIO_COMMAND(unsigned short data) { for (unsigned char loop =15; loop>=0; loop--) { SIN = data.loop;// Compiler gives error SCLK = HIGH; delay_us(50); SCLK = LOW; } SCLK = HIGH; } Error message: Main1.CAudio.C(47:17): error: unexpected '.' operator Audio.C(47:12): error: failed to generate expression Audio.C(47:12): error: invalid operand 'data.loop' Audio.C(47:10): error: failed to generate expression Thanks Bade
  9. Hi Jorge, Please can you explain what you did in your ceil function? I copied and pasted the piece of code but it doesn't compile Thanks Badejo
  10. Thanks Jorge …for the thorough explanation. I will try it out and update the thread shortly. 2 cents? Best regards Badejo
  11. Please any information or suggestion is welcome. Question: 1. Does boostC have any inbuilt "rounding" function? One that rounds to the nearest integer e.g. like python's "maths.ceil ( ) function" . I want to manipulate a float number say 3.4 to become 3.5. If I were to do this using the ceil ( ) function: ceil (2 * raw_decimal) / 2 where : raw_decimal = 3.4 , the function rounds 6.8 to 7 then dividing by 2 gives 3.5. I basically want to get my numbers to the nearest whole or 0.5 decimal. 2. Is there any work around in boostC if there is no inbuilt compiler function to do this? Thanks Bade
  12. I am not using a secondary clock.The PIC uses the internal oscillator. The PIC can only wake up to a portb 0 interrupt, but this is not the case.It just never goes to sleep, and there are no codes after the sleep instruction this way i can detect a current drop on the ammeter…Could it be because I am using the internal oscillator? Thanks Badejo
  13. When I call the sleep function in boost C, using mplab IDE, the PIC does not go to sleep.I have tried inline assembly as well and still the PIC does not sleep.I observed the current consumption when the sleep function is called and still no current drop. I also included the "boosts.h" and it still does not work. Has anyone used the sleep routine and it worked? Or is this problem PIC related? Thanks Badejo
  14. Thanks Reynard
  15. Hi Reynard, Any suggestions.I am new to boost C. Thanks
×