Author Topic: Use "Build -> Run" to execute something else  (Read 11756 times)

Offline pyrohaz

  • Single posting newcomer
  • *
  • Posts: 2
Use "Build -> Run" to execute something else
« on: November 09, 2015, 12:06:25 am »
Hi all,

I've got Codeblocks configured with SDCC, along side the STM8 series of microcontrollers. I can compile and link fine along with generate the .hex file required. Currently, I have the .hex file being uploaded to the STM8 after the build process has completed. What I'm wondering is can I change what the Build->Run command does to instead of trying to execute the program in windows, execute the ST uploader from command line and upload to the microcontroller?

Thanks,
Harris

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Use "Build -> Run" to execute something else
« Reply #1 on: November 09, 2015, 12:22:58 am »
You can do this using a post build step or using a tool.
You can probably setup another commands only target to do this.
(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 scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Use "Build -> Run" to execute something else
« Reply #2 on: November 09, 2015, 09:44:59 am »
Or use the Toolsplus plugin to define custom commands to program your microcontroller or execute the code etc...

Offline pyrohaz

  • Single posting newcomer
  • *
  • Posts: 2
Re: Use "Build -> Run" to execute something else
« Reply #3 on: November 09, 2015, 09:51:08 pm »
Or use the Toolsplus plugin to define custom commands to program your microcontroller or execute the code etc...

Aha! I didn't know such a thing existed. I've now created a Toolsplus macro.

Thank you all for your replies!

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: Use "Build -> Run" to execute something else
« Reply #4 on: November 18, 2015, 11:51:02 pm »
You might be able to create a new compiler profile for it too. That would make the build, run etc buttons work like normal for your micro.

settings->compiler and then click on copy, name it whatever and then just edit the directory and toolchain executables to whatever your microcontroller software needs.