I tried to implement a simple mcs51 project wizard for the mcs51 architecture using sdcc but I have some problems I need help with. I attached the current files as a zip file in case anyone needs to have a look. Here is a summary of what I've done:
1- I modified the 'common_functions.script' file to include 'sdcc' specific options.
2- I created the 'wizard.script' and 'wizard.xrc' files with simple .png files made on the fly.
3- I modified the 'config.script' file to include my template.
The wizard creates the project files with correct settings corresponding 'debug' and 'release' targets but I couldn't manage to make the assembler assemble the .asm file created. I tried changing the output directory and the object file output directory to the source directory with no luck. I guess there is something with how cb passes directories to the compiler or about some missing settings I failed to implement in the wizard. Here is what I get when I try to build the project. Any help?
sdcc.exe -mmcs51 -Wall --model-small --debug -IC:\GNU\SDCC\include -c main.c -o obj\Debug\main.rel
sdas Assembler V02.00 + NoICE + SDCC mods + Flat24 (Intel 8051)
Usage: [-Options] file
Usage: [-Options] outfile file1 [file2 file3 ...]
-d Decimal listing
-q Octal listing
-x Hex listing (default)
-j Add line number and debug information to file
-g Undefined symbols made global
-a All user symbols made global
-l Create list output file1[lst]
-o Create object output file1[rel]
-s Create symbol output file1[sym]
-c Generate sdcdb debug information
-p Disable listing pagination
-w Wide listing format for symbol table
-z Enable case sensitivity for symbols
-f Flag relocatable references by ` in listing file
-ff Flag relocatable references by mode in listing file
-I Add the named directory to the include file
search path. This option may be used more than once.
Directories are searched in the order given.
removing
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
P.S: I tried not to use tabs and I apologize if I missed any. Thnx...
Edit: Here is the simple code I'm trying to build.
#include <mcs51/8051.h>
void main(void)
{
// Insert code
while(1)
P0^=0x01;
// return;
}
There is a typo:
@@ -509,7 +518,7 @@
local pf = prj.AddFile(tgtidx, the_file);
GetProjectManager().RebuildTree(); // make sure our view is current
- // if the file was added successfully, (...)
+ // if the file was added succesfully, (...)
if (!IsNull(pf))
{
// add to this file the rest of the selected targets...
And an unrelated change:
@@ -35,7 +35,8 @@
RegisterWizard(wizProject, _T("gtk"), _T("GTK+ project"), _T("GUI"));
RegisterWizard(wizProject, _T("irrlicht"), _T("Irrlicht project"), _T("2D/3D Graphics"));
RegisterWizard(wizProject, _T("lf"), _T("Lightfeather project"), _T("2D/3D Graphics"));
- RegisterWizard(wizProject, _T("matlab_csf"), _T("Matlab project"), _T("Console"));
+ if (PLATFORM == PLATFORM_MSW)
+ RegisterWizard(wizProject, _T("matlab_csf"), _T("Matlab project"), _T("Console"));
RegisterWizard(wizProject, _T("opengl"), _T("OpenGL project"), _T("2D/3D Graphics"));
RegisterWizard(wizProject, _T("ogre"), _T("Ogre project"), _T("2D/3D Graphics"));
RegisterWizard(wizProject, _T("plugins"), _T("Code::Blocks plugin"), _T("Code::Blocks"));
And commented code, which has to be removed/fixed:
+// WarningsOn(project, Wizard.GetCompilerID());
Also does this work on Linux? Is this platform programmable on Linux?
If yes, this line should be made cross platform:
+ pb_hex = _T("cmd /c \"packihx <$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).ihx >$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).hex\"");
I've not run the wizard, so I can't tell if it works.
Also can you explain why you're changing the common script?