Hi All. I have recently re-entered the world of micro programming with both STM8 and PIC.
I found the move from PC a little difficult since there seems to be a range of proprietary headers which published code tends to be written for. It is often not even clear which header files code is written for, and so far, I haven't even seen headers released with the code. For the un-initiated, this can be daunting. I suspect this high barrier to entry feature comes courtesy of the licensing ST decided to apply to their header files. I notice many example programs for SDCC and the STM8 define registers explicitly in the code instead of using pre-defined mnemonic representations of registers which may otherwise be defined in a header file. A freely licensed set of headers with consistent and standardised mnemonics and register bit granularity would be seriously useful. I have started writing my own header file for all the code I write. Perhaps as this gets more complete and compatible across compilers, I might release this, unless someone else has done the same. I have so far been getting used to the architecture with ST Visual develop combined with a free evaluation version of the cosmic compiler. I don't believe the Cosmic compiler free version is supposed to lack optimisation found on the paid for version. However, I'm not particularly impressed with the Cosmic compiler since I have defined a constant expression featuring a raised to the power expression. No run time variables, no globals affected. An inclusion of a reference to this constant results in the code growing from about 3.6k to nearly 8k. All the floating point math functions find their way into the final code, and doesn't even currently reference a run-time variable. The constant expression can and I believe should be evaluated at compile time, and superfluous math functions shouldn't find their way into the final release binary. Should I expect SDCC to do better, and to optimise away functions which are not dependent on run time variables? I have had to start re-factoring some code in my header file, and find the ST header files broadly incompatible with SDCC. Where do I go from here? Has someone already released fine grained SDCC compatible header files for the STM8? Thanks. Nick. ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user