Author Topic: Code::blocks and 68HC11 Compiling tool - Using DOSBox 0.74  (Read 14863 times)

Offline Bruno38

  • Single posting newcomer
  • *
  • Posts: 3
Code::blocks and 68HC11 Compiling tool - Using DOSBox 0.74
« on: December 13, 2021, 04:34:34 pm »

I am trying to use code::blocks on a old 68HC11 project which usually use DOSBox 0.74for compiling.

I set the asm files for compilation like but it does'nt work :

-------------- Build: Release in UCITI (compiler: C11 & C80 - Feeder Compiler)---------------
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Crts.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Function.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Hpi.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Rom-481.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Tc-ctrl.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Timer_it.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\Vector.a11
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf asm C:\ITI\UCITI\xr16l580.a11
Linking stage skipped (build target has no object files to link)
Running project post-build steps
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf link UCITI
"C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -conf DOSBoxLegacy.conf hexsum -a0x1B000 -s17 UCITI.hex

I would like to compile in DOSBox-0.74 simulator. I think I can use toosl+ functionalty but I don't know how to set and use it.

Could you help me please to use tools+ on code::blocks ?


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code::blocks and 68HC11 Compiling tool - Using DOSBox 0.74
« Reply #1 on: December 13, 2021, 11:48:44 pm »
Can you describe a bit more, what you want to do?
Use DosBox to run a compiler for a 68HC11 Prokjekt? Run the simulator in the DosBox, from within codeblocks?

What is your problem? Object files not generated? Hex file not generated? Simulator not started?

Offline Bruno38

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::blocks and 68HC11 Compiling tool - Using DOSBox 0.74
« Reply #2 on: December 14, 2021, 10:03:00 am »
Hello BlueHazzard.

Thanks a lot for your reply.

Before using Code::blocks, I usually generate my 68HC11 .hex file by launching batch script for each source file (.c11 and .a11) in a DOSBox simulator window to generate .o files.

Then I launch another batch file for link and a program to generate .hex file with checksum always in DOSBox simulator.

So i tried to set code::blocks with the following settings :

With these settings, the DOSBox window is opening for each file, but the command "asm $file" or "c $file" is not executed inside this DOSBox window and .o files are not generate.

it's the same problem for link and hexsum command (the DOSBox is opening, but commands are not exeuted, so no file generated).

I certainly not set correctly Code::blocks to compile each source file, link and generate .hex file in the DOSbox simulator.

Does these precisions help you to understand my problem ?


Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Code::blocks and 68HC11 Compiling tool - Using DOSBox 0.74
« Reply #3 on: December 14, 2021, 10:53:33 am »
Is this correct?
1. You want to use C::B as the source code editor? Yes/No?
2. The 68HC11 compiler will not run on an x64 OS as it is a 16bit app? Yes/No?
3. You want C::B to use the 68HC11 compiler and 68HC11 linker? Yes/no?
4. Do you want the compiler failures to show you where the problem occurred? Yes/no?
5. Is there any 68HC11 C compiler you can use that is x64 based? Yes/no?

In the past I have used DosBox and found it a PITA compared to it's forks. At the moment I have a comms capp I run under DosBOX-X and also have been playing with DosBox- Staging as these have a gui and support teh PC hardware allot better than the standard DosBox.
In the past I have used dosbox I map the source tree to Z: and also use the free 4DOS command processor. From the Z: I run the batch file to build the app using MSVC 1.5.2 C++ and the Paradigm Linker/Locator for an embedded X86 Elan 410 CPU.

So have a think about do you want C::B to build the app when the compiler is so old and cannot run in the same OS?
Also have a good think about getting a 68HC11 compiler that works on a x64 bit OS.
Also have a think about trying a Windows 10 x86 version in VirtualBox that can run the C::B 32 bit version and the old 68HC11 compiler in the same OS without the need for DosBox. This is how I did development for another project that used Borland C++ 4.5.2 and Paradigm Linker/Locator (different version to the previous one) and a special custom Borland Debugger that did not work in X64 environments.

If you get this far then think which is the best way to skin the cat and it may be not be what you or I think, so try different things and see what works or not and learn. Good luck.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code::blocks and 68HC11 Compiling tool - Using DOSBox 0.74
« Reply #4 on: December 14, 2021, 08:35:34 pm »
Can you give me an example from the batch file?

If i understand it correctly, you have added this compiler command for every file?
I think it would be more easy to generate a new compiler:
1) Settings->Compiler->Global compiler settings->Selected compiler -> GnuGcc ->Copy  give the new compiler a name
2) Under Toolchain executables tab select your Dosbox as C compiler and Linker
3) Go to other settings tab (you maybe have to hit the > icon to show the tab) -> At the bottom "Advanced options"
4) Here you can define the compiler and linker command line. So it will be generated automatically, so for example in your case:
$compiler -conf DOSBoxLegacy.conf asm $options $file
for the linker the same....

If you could me the exact command line how you have to call the compiler, linker and how the output files are generated i probably could help you better