Author Topic: Wizard for STM8 projects using SDCC?  (Read 283 times)

Offline greenpossum

  • Single posting newcomer
  • *
  • Posts: 5
Wizard for STM8 projects using SDCC?
« on: May 16, 2020, 03:13:26 am »
Has anybody developed a wizard for creating STM8 projects using SDCC? I did a search and all I could find was an abandoned project on Github. Seeing as there is already a wizard for MCS51 using SDCC, I was considering using that as a starting point.

The other thing is it looks like I'll have to put my wizard in the system directories. I have the permissions to do that but it will get wiped out if I upgrade the package, which comes from my distro, so I'll have to save a copy. Is there a path for personal wizards?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6911
    • My Best Post
Re: Wizard for STM8 projects using SDCC?
« Reply #1 on: May 16, 2020, 03:16:43 am »
If you edit a wizard the edit are saved to a local location; I have no idea where this is for Linux.

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

Offline greenpossum

  • Single posting newcomer
  • *
  • Posts: 5
Re: Wizard for STM8 projects using SDCC?
« Reply #2 on: May 16, 2020, 05:28:54 am »
I would probably clone and modify the wizard files with a text editor on Linux, and derive a new logo using gimp, but from what I can see C::B only looks at system directories for wizards. We'll see.

Offline greenpossum

  • Single posting newcomer
  • *
  • Posts: 5
Re: Wizard for STM8 projects using SDCC?
« Reply #3 on: May 16, 2020, 07:49:33 am »
Ok I've whipped together a wizard for STM8 with SDCC and it seems to work, except for one thing. The project inherits -I/usr/include from the global SDCC settings. This doesn't work as defines will clash. How can I cancel that in the STM8 wizard?

I can publish to Github for testing by others when this is point is resolved.

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Wizard for STM8 projects using SDCC?
« Reply #4 on: May 16, 2020, 11:00:01 am »
Find the line/call where you're adding this path and remove it...
The project settings are up to the wizard script.
If this path is actually set in the project and not in the global compiler settings.

p.s. if you've not found how - you can have a local wizard. Here are some docs: http://wiki.codeblocks.org/index.php/Wizard_scripts
(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 greenpossum

  • Single posting newcomer
  • *
  • Posts: 5
Re: Wizard for STM8 projects using SDCC?
« Reply #5 on: May 16, 2020, 06:06:59 pm »
It seems to be set in the global SDCC options (also for MCS51 for example) but it can be turned off by editing the global options. However I would argue that it's a mistake to include /usr/include in the SDCC options, as the embedded target has nothing to do with the cross-development host. Also /usr/lib for the library search path. However I'll let someone else decide that.

I'll test it a bit more then announce the Github repo for it. Then people can get hold of it and/or devs can add it to the the code base.

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Wizard for STM8 projects using SDCC?
« Reply #6 on: May 16, 2020, 07:37:45 pm »
It could be added to codeblocks only if you post a patch against our repo. :)
Generally it is better to have these things separate and modify codeblocks to make it easy for people to install such things.

About the paths. It is an error. We had a similar thing happening for the avr compiler. But I don't remember what was the exact problem. It is best to log this in our ticket tracker on sf.net, so it won't be forgotten.
(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 greenpossum

  • Single posting newcomer
  • *
  • Posts: 5
Re: Wizard for STM8 projects using SDCC?
« Reply #7 on: May 17, 2020, 01:40:42 am »
Well I'll leave that for someone else with sufficient interest to do. I have no desire to pull in a whole code tree just to submit a feature or to get involved in C::B development. My code is under MIT license so anybody can do as they wish with it. I only added this wizard to be able to use the editor. I have been using Makefiles all along just fine and still do. The repo is here:

https://github.com/kenyapcomau/codeblocks-wizard-stm8