
Pavel
Administrators-
Content Count
1,471 -
Joined
-
Last visited
Everything posted by Pavel
-
Cant Understand The Error Is! Help !
Pavel replied to kseng2002's topic in BoostC and Chameleon compilers programming
You don't seem to have a function asm(char*); declared in your code. If what you intended to do is to embed assembly into C code than you did it wrong. Please check the compiler help which explains how to use assembly inside C code. Regards, Pavel -
Nice spot. An inline function must be declared with a body. Now fixed. Compiler will report an error for inline function declaration without a body. Regards, Pavel
-
Generated Asm Question
Pavel replied to SnakeByte's topic in BoostC and Chameleon compilers programming
I looked more into this issue and came to conclusion that this code is invalid and BoostC should report an error. In the expression "ostring= "12345";" a data type char* is assigned to data type char[5] but this is't a legal conversion. I will fix compiler so that it won't allow this. (BTW I checked with MSVC++ and it doesn't compile such code either). Regards, Pavel -
Generated Asm Question
Pavel replied to SnakeByte's topic in BoostC and Chameleon compilers programming
The useage scheme for pointers, arrays and strings works a bit differently than in your code. When you write: char arr[] = "abc"; compiler allocates 4 bytes of memory named 'arr' and copies 'a', 'b', 'c' and zero there. This is a part of declaration (btw you don't have to specify dimension here) If you write : char *ptr = "abc"; compiler allocates unnamed buffer 4 bytes long, copies 'a', 'b', 'c' and zero there and than assigns address of this memory to 'ptr'. When you declare an array and than assigns string to it compiler allocated memory for array, that allocates memory for -
Generated Asm Question
Pavel replied to SnakeByte's topic in BoostC and Chameleon compilers programming
Can you explain why? Regards, Pavel -
-
Fixed. Fix will be available in 1.8. Regards, Pavel
-
Which bootloader does work? Can you post URL where to find it? Regards, Pavel
-
For which target code was generated? Do you know which define is wrong? Regards, Pavel
-
Another cause of such error may be too short file names. The Hi-Tech COFF file format that stores all debug information and used by BoostC has this limitation and doesn't work well if file name base is shorter than 3 characters. We plan to fix this tweaking COFF file. Regards, Pavel
-
BoostC 1.7 Alpha update is available to download from http://www.picant.com/c2c/download.html. All bugs reported since the previous release are fixed. Thanks to everybody who sent us their feedback. This update must be installed over SourceBoost 5.7 installation. Regards, Pavel
-
Calibrating Osccal With Boostc
Pavel replied to andydavy's topic in BoostC and Chameleon compilers programming
Fixed. Fix will be available in 1.7 update. Regards, Pavel -
Boostc Programming
Pavel replied to don_erickson's topic in BoostC and Chameleon compilers programming
This was a compiler bug in '<' operation . Fixed now. Fix will be available in soon to be released 1.7 upgrade. Regards, Pavel -
Boostc Programming
Pavel replied to don_erickson's topic in BoostC and Chameleon compilers programming
... INCF read_eeprom_string_2_count, F ... The instruction above increments the 'count' value. SOmething else must be wrong. Do you have a project where this problem can be reproduced? Regards, Pavel -
We plan to release 1.7 before the next weekend (Nov 14). The 'rom' feature won't make it into 1.7 though Regards, Pavel
-
Data can be stored in code memory using 'rom' storage specifier in variable declaration. This feature is not yet supported in BoostC though: //data will be stored in code memory (not yet implemented in BoostC 1.6) rom char arr[] = { 1, 2, 3, 4 }; Regards, Pavel
-
Another way to save data and code space and make code flexible is to use function templates. This feature was borrowed from C++. It's not fully supported in BoostC yet but the part that is supported can already help. For example have a function that works with a port, want to have the port selectable at compile time and don't need it to be selectable at run time. Than code like this will help you ans save a lot of code and data space: template <char A> void foo( void ) { char port@A; ... //some code that operates with port } void main( void ) { foo<5>(); //funct
-
Preprocessor is ok. That's your code that's wrong. I tried it with MSVC and GCC and both reported an error. Regards, Pavel
-
The expression "cout << DoSomething(myValue);" doesn't have any destination and doesn't change any variable in the code. That's why compiler optimizes it out. This optimization happens at parsing stage when variables aren't known yet. This is why you don't get any error if cout isn't declared. Regards, Pavel
-
Fixed. Fix will be available in 1.7 Regards, Pavel
-
Fixed. Fix will be available in 1.7 Regards, Pavel
-
Boostc Memory Overwrite?
Pavel replied to josef's topic in BoostC and Chameleon compilers programming
Fixed. Fix will be available in 1.7 Regards, Pavel -
Fixed. Fix will be available in 1.7 Regards, Pavel
-
Fixed. Fix will be available in 1.7 Regards, Pavel
-
The script still left some errors: ... #define _OSC_ECIOSWPLL_10xFD ... Regards, Pavel