Search found 98 matches

by king2
Wed Jul 04, 2012 2:36 am
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

IAR port

I have tried to compile IAR port with different data and code models and it works for small code model only. Meduim and large code models does not works; same as large data model. I have found that all models was supported in 1.5, so something was broken or this is IAR issue? Now it working with Sma...
by king2
Sat Jun 30, 2012 5:06 pm
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

Giovanni wrote:CANCCR has already been addressed you should updated also hal_lld.c.

Giovanni

I have updated entire OS path.
hal_lld.c contains CLK->CANCCR = STM8S_CAN_DIVIDER_VALUE line (for STM8S208 only), but structure CLK does not contain CANCCR in CLK_struct, it contains RESERVED1 instead.
by king2
Sat Jun 30, 2012 3:59 pm
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

Hi, I committed the IAR port and a demo for the STM8S-Discovery. I adjusted the intctx and extcts and I think those are now correct. The following points remain open: 1) The port is untested because the test suite cannot run in 8K, the LED flashes, that is all the testing done... 2) Compiler proble...
by king2
Sat Jun 30, 2012 2:15 pm
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

Apparently it is this thing upsetting it: if (notempty(&iqp->q_waiting)) chSchReadyI(fifo_remove(&iqp->q_waiting))->p_u.rdymsg = Q_OK; Something that works perfectly in all other compilers, including IAR for ARM. I am using the compiler version 1.30.1,the latest. I had those errors, but mad...
by king2
Fri Jun 29, 2012 10:30 pm
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

I have tried to debug application and found that IAR's compiler inside task functions call ?push_w4, that not simple pop'ed info from stack, it reads and writes stack directly, broking info in start_ctx structure. After defining task functions with __task prefix (do not save and restore context in t...
by king2
Fri Jun 29, 2012 2:41 pm
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

OK, I attached it here. ISR asm listing follows: \ In section .near_func.text, align 1 113 __interrupt void TIM2_OVR_UIF(void) { \ TIM2_OVR_UIF: \ _interrupt_15: \ 000000 8A PUSH CC \ 000001 84 POP A \ 000002 A4BF AND A, #0xbf \ 000004 88 PUSH A \ 000005 86 POP CC \ 000006 CD0000 CALL L:?push_l0 \ 0...
by king2
Fri Jun 29, 2012 12:11 am
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

I've changed my project to be compatible with Cosmic and tried to run it. It works fine, so I think it is definitely IAR port issue. What about MCU, I'm limited with existing design and devices that was made in hardware, so I have no choice. For a little devices I prefer STM8S, at other side such MC...
by king2
Thu Jun 28, 2012 1:24 am
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

Giovanni, thank you for trying to help me. If my tries to run my project under freeware versions of Cosmic or Raisonance will fail, I will try to port this on IAR again (or switch to atomthreads).
by king2
Thu Jun 28, 2012 1:20 am
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

Processor selection was made because of its price, STM8S cheaper than any comparable AVR, for example it has 4 hardware PWMs. Some time ago I have shifted from AVRs to STM8S for a-little-cheap-things and Cortex for more complex tasks. But in this project compiler and MCU selection was made without r...
by king2
Wed Jun 27, 2012 7:54 pm
Forum: General Support
Topic: Something strange with timers
Replies: 38
Views: 16552

Re: Something strange with timers

Yes, I understand this, but my knowledge is not enough to analyze extctx and intctx (and I do not know how to do this). I have tried to just put all theese 'push ?b15' and so on to inline asm, but failed (it just does not compile, it do not know what is '?b15'). I have compiled all without optimizat...

Go to advanced search