MC9S08GB32 Memory Ploblem with Codewarrior

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S08GB32 Memory Ploblem with Codewarrior

4,473件の閲覧回数
Alexandre_Mello
Contributor II
I'm using a program with Codewarrior, but my variables keep disapearing, like they were saved in a memory area that doesn't exist. I'm using no external memory, and would like some help with how to set Codewarrior to not trying to use external memory.
I've tried to use memory model Tiny and Small, and I got ploblems in both cases, but with different variables in each.
ラベル(1)
0 件の賞賛
返信
8 返答(返信)

2,200件の閲覧回数
Nouchi
Senior Contributor II
Hi,

maybe you are talking about a local variable, if it's the case, you probably used high level optimization (speed or size) and your local is optimized, (displayed in Grey in hiwave). If you want to trace your variable you can declare it as 'volatile' or declare it as global or select (with smart sliders) an easier debug mode level.


Emmanuel
0 件の賞賛
返信

2,200件の閲覧回数
Alexandre_Mello
Contributor II
Well, I did use the project wizard, and I didn't used any kind of optimization. Any suggestion on what may be happening?
0 件の賞賛
返信

2,200件の閲覧回数
Geezer
Contributor I
attach your code, and the project link file (.prm)
Better yet zip up the entire project.
0 件の賞賛
返信

2,200件の閲覧回数
Alexandre_Mello
Contributor II

I'm sending my entire project.

This project I got from the Freescale site and modified it a little (just changed the ports where my hardware were connected). The program was originaly designed for the MC9S08GB60 to be used with te MC13192, but I'm using the MC9S08GB32.

The variable that I'm having problem with is the "Timer_Goal", but there must be other variables with problems, but I couldn't find which ones exactly.
What happends is that this variable changes to a negative number without reason making the timer to stop too soon.

Also, I am using the version 3.1 of Codewarrior.

 

Sem_Fio.zip

Message Edited by t.dowe on 2009-10-27 12:31 PM
0 件の賞賛
返信

2,200件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
could this be a stack overrun?
Timer_Goal is around the highest allocated variables and the stack just has 0x50 bytes.
Try to increase the STACKSIZE in the prm file.

Daniel
0 件の賞賛
返信

2,200件の閲覧回数
Alexandre_Mello
Contributor II
It worked, the problem was really the STACKSIZE. Thank you all for the help!

And yes, I'm from Brazil-Curitiba-PR.
0 件の賞賛
返信

2,200件の閲覧回数
Br
Contributor I
Hi Alexandre,

I opened your project in my CodeWarrior CW08 V5.0 . At first look it seems that the program is OK.
Try to download this CodeWarrior version (CW08 V5.0) and test your project.


Where are you from? I saw the name "Sem Fio" in your project. I´m from Brasil.

Regards,
Emerson
0 件の賞賛
返信

2,200件の閲覧回数
Br
Contributor I
I'm using a program with Codewarrior, but my variables keep disapearing, like they were saved in a memory area that doesn't exist. I'm using no external memory, and would like some help with how to set Codewarrior to not trying to use external memory.
I've tried to use memory model Tiny and Small, and I got ploblems in both cases, but with different variables in each.

Hi Alexandre,

Nowadays I´m working wiht MC9S08GT32, that is the same MCU that you are using. The only difference is the number of pins.
I´m considering that you are programming in C language. Both of them can be created automatically by the CodeWarrior on the correct place in RAM memory if you create your project using the CodeWarrior wizard assistent. Please verify this possibility and post your conclusion here in our forum.

Regards

Emerson
0 件の賞賛
返信