Author Topic: Creating a new microprocessor template  (Read 2938 times)

Offline JimB

  • Single posting newcomer
  • *
  • Posts: 3
Creating a new microprocessor template
« on: January 20, 2020, 08:49:18 pm »
Greetings software developer friends,

I created a template for a new Arm microprocessor currently not listed in the group of ARM micro selections.  Its a Cortex 4M.  The way I created it was simply to go into the templates folder for Codeblocks, copy the folder and files for the closest version of an ARM, and then modify it in a new folder to reflect the Cortex 4M.  My problem now is that Codeblocks won't recognize the new ARM offering, and I don't know how to properly register this new selection with Codeblocks.

Could someone who has some knowledge about these things please throw me a bone so that I can figure out how to use the Codeblocks IDE for my next development project?

Thank you very much!

JimB
« Last Edit: January 20, 2020, 08:51:43 pm by JimB »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Creating a new microprocessor template
« Reply #1 on: January 20, 2020, 09:38:29 pm »
If you are talking about a Wizard, you can edit the Wizard.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline JimB

  • Single posting newcomer
  • *
  • Posts: 3
Re: Creating a new microprocessor template
« Reply #2 on: January 20, 2020, 10:25:42 pm »
Thanks so much for your reply.

I just edited the wizard for the arm processors, and then in a command prompt executed the templates master script (config.script) which executes the arm wizard.  However, now when I atempt to run codeblocks.exe, I get an error that says that the exe file that the shortcut refers to has been changed or moved, and that the script will no longer work.  I assume that this means that I have an error in my arm wizard that I modified, right?

I tried running that master script and send the output and error to a temporary file so I could see what was failing, however nothing was copied into that temporary file, though it was created. 

Does anything stick out to you that I am doing wrong?

JimB
« Last Edit: January 20, 2020, 11:06:31 pm by JimB »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Creating a new microprocessor template
« Reply #3 on: January 21, 2020, 12:31:18 am »
I have no idea what you did wrong; but, I can not understand what you stated as having real meaning in what you should have done.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Creating a new microprocessor template
« Reply #4 on: January 21, 2020, 08:51:14 am »
@jimb: You have to call RegisterWizard with your wizard sometime at startup for this to work. Search for it and you'll see how it is done for the other wizards.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline JimB

  • Single posting newcomer
  • *
  • Posts: 3
Re: Creating a new microprocessor template
« Reply #5 on: January 21, 2020, 05:06:24 pm »
Thank you oBFusFCATed! 

When my program runs, it runs from this folder:  C:\Users\jabomkamp\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\CodeBlocks

In that folder are six different scripts.  I haven't done a lot of Windows development so I am not sure how to do some things.  If I put a call to register new wizard in this list of scripts, are you saying that it will run before Codeblocks executes and Codeblocks will have what it needs to accept and use my wizard script (and add a new microprocessor choice under ARM in my case?)

JimB

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Creating a new microprocessor template
« Reply #6 on: January 21, 2020, 07:43:34 pm »
All squirrel scripts run inside the codeblocks.exe process. So your understanding of how it works is not correct.

Try reading the docs at http://wiki.codeblocks.org/index.php/Wizard_scripts hopefully it will make it clear what you need to do.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Creating a new microprocessor template
« Reply #7 on: January 22, 2020, 10:06:42 am »
1) It would be nice if you could tell us what coretx you are using, and what modifications have to be done
2) As other poster pointed out, the wizard bases on squirrel scripts. You can modify this scripts by:
File->New->Project->Make right click on the wizard you want to modify->Edit script

If you create a new wizard, you have to add it to the loading script:
File->New->Project->Make right click on any wizard->Edit global registration script
Here you have to add your script. Save the file and restart codeblocks...

If you want more help, describe the changes you made/ want to make in more detail