Creating an Assembly language project in CW for Coldfire: How do I do it?

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

Creating an Assembly language project in CW for Coldfire: How do I do it?

3,539件の閲覧回数
JTech
Contributor III
Hi all
 
I am having a very contentious issue that has gone unsolved for about 14 months....
 
I have legacy Coldfire code (V1), which I would like to use on my MCF52233 EVB. The problem is that, unlike other editions of Codewarror, the Codewarrior for Coldfire Architectures does not have an option in the project wizard to create an absolute/relocatable assembly project. It only offers C or C++ and that's it, no other options. Other versions of CF for the 8/16 bit platforms allow you to select an assembler project and it sets the thing up for you automatically and the resultant template is very nice in that it allows you to get going straight away and write code within minutes.

Is it possible to do the same with the Coldfire version of CW? If not, could someone who is an expert with Codewarrior provide a summary of how to do it, or perhaps a sample project where there is just enough code to get the processor started out of reset, nothing more. I have discussed this at length with various FAE's and they were unable to help me because all their customers code in C.
 
The problem is I understand assembler very well but C is still a problem for me. I struggle to do basic things in C that I can code in seconds in assembler.
 
Any and all help will be greatly appreciated.
 
 
ラベル(1)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,198件の閲覧回数
J2MEJediMaster
Specialist I
Use ColdFire for CW to generate a C project targeting the MCF52233, with a minimal hardware setup. In this resulting project, the files startcf.h and startcf.c contain the code that initializes the processor, such as setting the stack pointer. There's a lot of assembly language in the startcf.c file. This file is also commented so that you can rip out any code used to support the C run-time. The file exceptions.c shows how to set up the exception vector table. It's a mash-up of C and assembly language, but if you've set up your own vector table in the legacy code, you ought to be able to sort it out.

---Tom
0 件の賞賛
返信

1,198件の閲覧回数
JTech
Contributor III
Thank you for that. I've somewhat tried that, the problem is that when I remove things out of those files I end up seeing strange errors and warnings from Codewarrior. In one specific case it crashed the IDE. My main concern is it doesn't take too kindly to being manipulated in that way. I got quite far with this using a MCF5208 dev board in 2006, but now suddenly it seems to not want to work. Also, my copy of Codewarrior seems to be corrupt- which is not surprising seeing that I have 3 different versions on the same machine, to cover HCS08 and HCS12 micros because the products are not a one-size-fits-all type.
 
What has happened is that the local Freescale FAE has put through my request to the Codewarrior people so that they can advise what I should do in addition to advice given here. I will of course keep you in the loop regarding this
0 件の賞賛
返信

1,198件の閲覧回数
JTech
Contributor III
I went through the entire forum and found this:
 
 
It assembles when you hit F7 and it is a sterling example, all done in assembler.
 
The big thing is, can anyone tell me how to set up the debugger side of things for this? I have no clue and I've spent many hours trying to do so. I am using the P&E micro USB BDM integrated on the M52233DEMO board.
 
I had to fill in a lot of fields in the target settings, the problem is now it bleats with "Address Exception error" when you try and run it.
 
There are many settings and I am not sure what the target settings should be for a project like this.
0 件の賞賛
返信