Jump to content

jeddah02

EstablishedMember
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jeddah02

  • Rank
    Newbrie
  1. Hi Reynard, Adding the linker scrpt file libc.pic18.lib to the project cleared the problem. Mmm, i thought just adding the boostlink linker was all that was required, I shall have to spend some time reading this section of the manual....... Thanks for the all the help, it would have taken me some time to sort out all the nuances of Sourceboost. Best regards Warren
  2. Hi Reynard, I have the same problem with your version as my own, but i think I know the where the problem is. I use the MPLAB IDE and while the compiler compiles this code the linker gives the following error:- optimisation level:1 Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__rem_16_16 failure All compiles and links OK in the sourceboost IDE, should I report this as a bug? Warren
  3. Hi Reynard, Thanks, I found the problem be enabling the compiler to report all errors/warnings. As you mentioned, there was an "if" that allways evaluated false. removing it cured the problem. However, it also revealed another problem, how to code a leap year with Boostc compiler. the usual leap_year = year%4 doesent seem to work as only literal values seem to work. Onyone any ideas?? Warren
  4. Hi, I have been receiving this warning message from the BoostC compiler: Warning unreferenced functions removed. The functions consist of most of my source code, the code is not commented out and the functions are referenced, ie called , several times in source code. The project compiles successfully both with and without optimization but is only a few hundred bytes whereas it should be about 10K. I can't find any documentation on this warning or help as to why this happening. Can anyone help?? Warren
  5. jeddah02

    Plugin Flexibility

    Hi, A usefull addition would be to make the buttons and LEDS operate from from either +ve or - ve rail. As buttons only operate from + the the weak pullups being used in my design mask the button operation when simulated. A tick box in the button configuration set up for -ve rail op would be ok. Similar situation for Leds.
  6. jeddah02

    Eeprom Read Fail

    Hi Dave, Yep, I spotted it and wrote some code to flash an led if eeprom was read correctly and Ive tested it on my hardware. The problem is with the simulator after all. It never shows the eecon1.RD bit being set, so when I was debugging I assumed my problem was that the device was not actually being read and I was suffering data loss, which was the symptom I had. I should have realised it was next to impossible for the set_bit() function not to work and not set the required bit. The whole compiler would have folded....
  7. jeddah02

    Eeprom Read Fail

  8. jeddah02

    Eeprom Read Fail

    As i said, its not reading eeprom If I,m asking to read an eeprom location and the program does not read it, then the program crashes The data is written ok but what good is that if you cant read it back later!
  9. jeddah02

    Eeprom Read Fail

    As i said, its not reading eeprom If I,m asking to read an eeprom location and the program does not read it, then the program crashes The data is written ok but what good is that if you cant read it back later!
  10. jeddah02

    Eeprom Read Fail

    As far as I can tell it fails to read eeprom on the actual device so the simulator is probably giving the correct result.
  11. jeddah02

    Eeprom Read Fail

    Bug description: The eecon1.RD bit does not get set when trying to read from the eeprom memory on 16F and 12F parts. Steps to reproduce: the following code was used as a standalone quick test to reproduce the problem #include <system.h> //#pragma DATA 0x2007, 0x30C4 char read; char i; char eeprom1_read(char address); void main() { while(1){ for(i = 0; i = 20; i++) read = eeprom1_read(i); } } char eeprom1_read(char address) { eeadr = address; set_bit(eecon1,RD); return eedata; } //------------------------------------------ Expected behaviour: the eeprom should be read starting at 0 ending at 20 ad infinitum. Can be watched using the simulator. IDE version: 6.55 Compiler: Compiler (BoostC ) Compiler version: 6.55 Target device: PIC12F684 and PIC16F648A Fails to read eeprom on every occassion, eeadr register fails to incriment/decriment, and eecon1.RD fails to be set.
  12. jeddah02

    Eeprom_read

    Hi, Thanks for the reply. I've tried this code, without the eecon1.EEPGD bit as the PIC16 and PIC12 parts do not have this bit, but it still fails to read so I think it must be a bug. (The code is the same if this bit is ommited). Thanks
  13. jeddah02

    Eeprom_read

    Hi, Thanks for the reply. There is no write to eeprom instruction before the read, on startup the program is set to read the eeprom for data stored before a processor reset or power outage. So the usual processor setup functions are performed and eeprom is then read. Initially, on the first startup there is nothing in to read so I manually inserted some data but to no avail. I have tried the eeprom read function as a 'standalone' test outside of this program but it still fails to read eeprom. Its really got me going ....
  14. jeddah02

    Eeprom_read

    Hi, I've removed the status address bits from the code but its made no difference, the eecon1 register read bit does not get set and the return value is therefore 0. It seems such an 'easy' bit of code to write... Any other suggestions I could try???
  15. Hi, I'm having a problem when tring to read eeprom on 12F and 16F devices. I can write to the eeprom ok but the eecon1 register bits do not change on the simulator, or on a real device. The subroutine I've used is unsigned char eeprom12_read(unsigned char address) { set_bit(status,RP0); eeadr = address; set_bit(eecon1,RD); clear_bit(status,RP0); return eedata; } i've tried the microchip assemply code routine from the 16F648A/12F683 manuals with the s ame result. Is it my code or is it a compiler problem.
×