Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About tobik

  • Rank
  1. And here is another example: char bin_to_bcd_high (char bin) { if (bin > 199) return 2; else if (bin > 99) return 1; else return 0; #ifdef _BOOSTC return 0; // todo: boostc bug reported, remove when fixed #endif } BoostC 1.6 Alpha Regards, Tobias
  2. Bug description: Interrupt vector start with manipulation of STATUS register. Steps to reproduce: Compile this source void interrupt () { } void main () { } Generated interrupt vector ORG 0x00000004 interrupt; function begin ; { BCF STATUS,RP0 BCF STATUS,RP1 MOVWF Int1Context SWAPF Int1Context SWAPF STATUS, W MOVWF Int1Context+D'1' SWAPF FSR, W MOVWF Int1Context+D'2' SWAPF PCLATH, W MOVWF Int1Context+D'3' SWAPF Int1Context+D'3', W MOVWF PCLATH SWAPF Int1Context+D'2', W MOVWF FSR SWAPF Int1Context+D'1', W MOVWF STATUS SWAPF Int1Context, W RETFIE Expected behavio
  3. Pavel, BoostC 1.2 help: //Set PIC16 configuration word #pragma DATA _CONFIG _HS_OSC & _WDT_OFF & _LVP_OFF ... //Put some data into eeprom #pragma DATA 0x2100, 0x12, 0x34, 0x56, 0x78, "ABCD" 1. _CONFIG must be user defined - so better avoid it in the example. 2. The comma after _CONFIG is missing. 3. The linker generates "Overlapping user DATA at address:0x00002100" warnings. But beside the warnings the data make it into to LST file. Regards, Tobias
  4. Dave, you are right about _CONFIG is undefined. I did copy and paste it from the boostc.html documentation file. That should be updated. Note the missing "," behind _CONFIG too. The defines are in my main C file. Not in a header. It is not included twice. I double checked that. And variables from this file are not reported as redefined too. Please can you check that again? Regards, Tobias
  5. Pavel Just tried new #pragma DATA in boostc 1.2 alpha. #pragma DATA _CONFIG _PWRTE_ON & _WDT_OFF & _XT_OSC & _BODEN_ON & _LVP_OFF #pragma DATA 0x2100, 0x12, 0x34, 0x56, 0x78, "ABCD" DATA _CONFIG ... unknown pragma - no code DATA 0x2100 ... overlapping user data - but correct code BoostC Optimizing C Compiler Version 1.2 Alpha (for PIC16 architecture) http://www.picant.com/c2c/c.html Copyright© 2004 Pavel Baranov Copyright© 2004 David Hobday flightlog.c(72): warning: unknown or invalid pragma (ignored) success BoostLink Optimizing Linker Ve
  6. Sorry my post was misleading. What I want to talk about is a LABEL inside the data pragma which can be further used as reference to the address of this data. Example #pragma DATA EEPROM_ADDR_NAME_1@0x2100_de_"Name 1" ... char ch = eeprom_load (DATA EEPROM_ADDR_NAME_1); Of course a label for eeprom data at 0x2100 must be reference address 0x00. Regards, Tobias
  7. Good news! Thank you, Pavel. BTW - is it possible to define the address of the EEPROM data inside the #pragma DATA? Example #define EEPROM_ADDR_NAME_1 0x00 #pragma DATA 0x2100_de_"Name 1 " would be more comfortable and failsave as #pragma DATA EEPROM_ADDR_NAME_1@0x2100_de_"Name 1 " Regards, Tobias
  8. Dave, You are right. Your definitions are helpful. Hence I would appreciate it in the picXXX.h headers. Second idea is comfortable access to bits in any variable (fixed address or not) Regards, Tobias
  9. Dave Is bit addressing possible in variables? Something as bit ra4 @ porta.4; or while (porta.4); would be nice. Tobias PS: The <picXXX.h> headers could be extended with port bit variables.
  10. Dave Thank you for the explanation. I well understand your point of view. Even if my example show a valid situation for calling routines from differend "threads" you are right there are lots of different situations leading to errors. So lets call that a limitation. I will workaraound it. Thank you, Tobias
  11. Dave Yes, all files are in the project tree. You can find the project file with all sources in http://www.tobik.de/fliegen/boostc.zip Tobias
  12. Pavel, you are right. But the missing colon is only a typo from stripping down my problem. The behavior is the same with colon. Tobias
  13. Bug description: After editing of header files no make is initiated on compile or build. Steps to reproduce: 1. Have a project with c and h file. 2. Build project 3. Edit header file 4. Build project -> only message done is given. Expected behaviour: The project should be rebuild. Reproduceable: always SourceBoost DE version: 5.6.1 Compiler: BoostC and C2C-plus Compiler version: 1.1 / 5.6.1e OS: WinXP
  14. Bug description: If a method is called in main () and interrupt () then we get an error Function called in more that one execution thread: Steps to reproduce: static char ch; char read_eeprom (char addr) {...} void interrupt () { ... char ch2 = read_eeprom (2); ... } void main () { ch = read_eeprom (1); // Initialization set_bit (intcon, GIE); // Enable interrupts while (1) sleep (); } Expected behaviour: There could be a warning but no error. Reproduceable: always SourceBoost DE version: 5.6.1 Compiler: BoostC
  15. Bug description: error: error in build-in assembly Steps to reproduce: asm { __CONFIG _PWRTE_ON & _WDT_OFF & _XT_OSC & _BODEN_ON & _LVP_OFF & _WRT_HALF } Expected behaviour: Insert config value in HEX/ASM file. Is the problem 100% reproduceable: always SourceBoost DE version: 5.6.1 Compiler: BoostC Compiler version: 1.1
  • Create New...