Page 4 of 4
Re: Something strange with timers
Posted: Wed Jul 04, 2012 9:16 am
by king2
OK, i will setup new IAR compiler 8k on separate notebook and will try to build all from scratch (and look on compiler errors).
Re: Something strange with timers
Posted: Sun Jul 08, 2012 12:45 pm
by king2
I got same errors in IAR with optimization turned on.
I cannot make it working 'as is', but errors magically disappears if I turn on DEBUG_CHECKS in chconf.h.
If I turn optimization on, but turn off ' common subexpression elimination' checkbox, chsem.c starts to compile OK.
This issue lays in isempty/notempty macros (chlists.h). If I define it as (0), errors disappears too (but it useless, for localization of problem only).
May be this is IAR compiler issue, I do not know.
Which version of IAR compiler you have tried (mine is 1.30.1.20036)?
Re: Something strange with timers
Posted: Sun Jul 08, 2012 12:57 pm
by Giovanni
It is 1.3.1. The issue is related to the compiler STM8 backend, IAR for ARM works correctly.
Giovanni
Re: Something strange with timers
Posted: Sun Jul 08, 2012 1:04 pm
by king2
Are you have downloaded fresh install from IAR? Should I check this issue with fresh version?
What about adding I2C HAL module to ChibiOS?
What aboud adding my modifications to IAR port?
At least, it has workaround to be used in different memory models..
Re: Something strange with timers
Posted: Sun Jul 08, 2012 1:39 pm
by Giovanni
Hi,
Adding more stuff is possible but only after the issues with the compiler are resolved. I am not interested in maintaining a port for a buggy compiler (the same applies to the other STM8 compilers, they all are "less than optimal" for various reasons).
Your best option is to contact IAR for support since you are a customer of the full version. They just have to compile the demo with optimizations and verify the problem.
I really wish a GCC port for the STM8 but apparently nobody is interested in doing that.
Giovanni
Re: Something strange with timers
Posted: Sun Jul 08, 2012 2:11 pm
by king2
I2C HAL module has nothing related to IAR, as I understand, it will compile under any other compilers.
Re: Something strange with timers
Posted: Sun Jul 08, 2012 3:25 pm
by Giovanni
Hi,
ChibiOS is handled as an open source project but is also a commercial product so I never simply add all the code that is submitted. On the STM8 currently I am not investing time for the following reasons:
Including a driver would require:
1) Code review
2) Documentation
3) Test application
4) Tests
All the above require time and I don't want to invest time until the situation with compilers is cleared, so far:
IAR: blocking bug (and very expensive, I cannot do tests with a 8K limited compiler).
Cosmic: blocking bug.
Raisonance: works but generates unoptimized code.
My understanding of the situation: STM8 is no-go for development because poor compilers support, it is a shame because I had high hopes for that platform.
All the above does not impact you because you can use the I2C driver without having to worry about points 1, 2, 3 and 4 (but you should worry about compilers...).
Giovanni
Re: Something strange with timers
Posted: Sun Jul 08, 2012 3:30 pm
by king2
OK, so as I understand, situation with compilers will not be changed (IAR will not drop prices, and so on)..
Ok, I can have separate HAL parts that I can just copy to fresh OS fetched from SVN to get full HAL that I want.
If you want, I can share it via website too for all that will be interested in STM8 HAL even with current compiler's situation...
Re: Something strange with timers
Posted: Sun Jul 08, 2012 3:33 pm
by Giovanni
You should report the problem to IAR and have it fixed IMHO, that would fix at least your problem.
The driver is already shared on the forum so it is already available until it will be eventually included, a working IAR compiler could be a good incentive

Giovanni