Merging projects

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,404件の閲覧回数
RoadKill_CodeKi
Contributor I
Has anyone done a boot code/application code scenario and managed to set things up so that both get programmed into the target hardware (HC08 family) when the debugger is run (using F5 or similar means)?

My dilemma is this: my boot code and application code are handled as two separate and distinct projects, but both are needed for the target hardware to operate properly.

I have not been able to figure out a way to combine the output of the two projects and program the combined into the target. Right now I am building both projects, combining the s19 files into one s19 file using a text editor, running the debugger using F5, telling it not to program the target hardware, loading the combined s19 file using File->Load, programming that image into the hardware, and then going back to the File->Load menu to load the symbols only from the .abs file of the particular project I am intending to debug.

As you can see, while this does work, it is a rather cumbersome (and error-prone) process. There must be some way to automate this somehow. I have tried inserting the LOAD command into the Startup, Preload, Reset, and Postload command files. The command is apparently parsed properly but the debugger complains that I cannot execute the load command while the debugger is loading . I have been unable to find any other means of automating this process.

Any ideas would be welcomed!

-Tim
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
765件の閲覧回数
rocco
Senior Contributor II
Here are two ways that I have handled it, but I'm not sure it's much easier than combining the S19 files, which I do also.

For my bootloader:
I wrote and debugged it separately, and it is a standalone project. I wrote it to use it's own program segment (called 'Bootstrap'), such that it always ends up in the right location, regardless of what is linked with it.

However, once it was completed, I put it's source into a directory shared by all projects, and then #include the source in those projects. In effect, I'm including the bootloader at the source level.

For my DSP code:
The program memory of my DSP is ram, and the HC08 downloads it on powerup. A colleague wrote a program that parsed the DSP S19 file into a file of " dc.b $xx,$yy,$zz . . . "

I then #include this 'hex' file into the project, within the segment reserved for the DSP code.

Hope this helps (but I kinda-doubt-it).

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
765件の閲覧回数
BlackNight
NXP Employee
NXP Employee
There is an easier way to merge S-Records/S19 files compared to use a text editor. The burner.exe in the prog utility can do this. If you create your project with the wizard, it adds as well a .bbl file to the project. This one is processed after linking. Have a look at the commands, and there is as well a preference panel for it in CodeWarrior.

Below is an example .bbl script to do so:
OPENFILE "output.s19"
format=motorola
busWidth=1
origin=0
len=0x10000
destination=0
SRECORD=Sx
SENDBYTE 1 "my_file_1.s19"
SENDBYTE 1 "my_file_2.s19"
CLOSE

Erich
765件の閲覧回数
RoadKill_CodeKi
Contributor I
Thanks, Erich and rocco for your suggestions. I had considered doing something similar to what rocco described but I figured there must be an easier way. The burner utility is able to combine the two projects and I was able to create a merged s19 file quite easily using Erich's suggestions.

I also found the location in the Build Extras that points to the hiwave debugger and was able to point to this merged file using the arguments to the debugger. So it appears that the merged project is being loaded as the default executable when the debugger is launched.

So I'm at least 90% of the way there. The only thing left is symbols. I'm still looking for a way to automagically load the symbols for a project once the debugger is run.

Thanks,

-Tim

Message Edited by Road Kill, Code Kill on 04-17-200611:33 AM

0 件の賞賛
返信
766件の閲覧回数
rocco
Senior Contributor II
Here are two ways that I have handled it, but I'm not sure it's much easier than combining the S19 files, which I do also.

For my bootloader:
I wrote and debugged it separately, and it is a standalone project. I wrote it to use it's own program segment (called 'Bootstrap'), such that it always ends up in the right location, regardless of what is linked with it.

However, once it was completed, I put it's source into a directory shared by all projects, and then #include the source in those projects. In effect, I'm including the bootloader at the source level.

For my DSP code:
The program memory of my DSP is ram, and the HC08 downloads it on powerup. A colleague wrote a program that parsed the DSP S19 file into a file of " dc.b $xx,$yy,$zz . . . "

I then #include this 'hex' file into the project, within the segment reserved for the DSP code.

Hope this helps (but I kinda-doubt-it).
0 件の賞賛
返信