[OBSOLETE Tutorial][Advanced]1.Programming Pokitto "offline" using EmBitz IDE

Thanks for the information!

Edit: figured out the workspace thing. When I try to build I get an error that says,
"Running target post-build steps
arm-none-eabi-objcopy.exe -I ihex .\build\myproject.hex -O binary .\build\myproject.bin
.\build\lpcrc .\build\myproject.bin
Execution of ‘.\build\lpcrc .\build\myproject.bin’ in ‘C:\Users\Gavin\Documents\GitHub\MyProject’ failed.

Edit2: I hadn’t copied the lpcrc.exe file to my build folder yet. It works now.

Noticed another post on this forum that caused me to try compiling Blocky World again. I think that it’s worked, but whenever I try renaming the .elf, .bin, and .hex files in EmBitz, the compiler begins to spew out errors about min and max macros not having the correct amount of arguments passed. For whatever reason, it seems to not happen when the three file names are set to “hello” – is it the absence of a .elf file or something that’s causing this? Also, can I simply rename the .bin without problems?

I would so gladly help you out with all of your issues but like I’ve said, if I can’t see what you’re trying to do, it is very difficult to help.

Many people have zipped their projects and/or shared a private repository on bitbucket or some other way, I have debugged the code with them and told them how to fix it. I would really like to help you out, but having only bits of information about how your project is set up makes it very hard.

  1. .elf, .bin, and .hex files in the Project Build options have to be the same, for example “hello.bin, hello.elf, hello.hex”. Remember to check post-build steps because that is where the actual final binary is made

  2. min max problems, as discussed and explained here several times, are a result of the fact that there are 2 different ways that min max have been defined. For compatibility reasons, PokittoLib includes the 2-parameter min/max used by Arduino, but that conflicts with the 3-parameter GCC min/max if any mathematical functions from c stdlib (that use min max) are used. This difference in number of parameters is the thing that is throwing the errors - even if min max is not used in your own code

Put this in your My_settings.h (or project build settings / #defines tab) if you want to disable the Arduino min/max and things should work:


3 .bin name can be renamed to anything without problems. If you want to put it on the SD card it needs to be in the DOS 8.3 format (8 letters for name and .BIN)

1 Like

Just installed this en tried to compile the Hello world example, but a few questions did arise.

  • there is no HelloWorld.epb in the supplied folder, there is only a PokittoEmbitz so i am geussing this was updated ?
  • Making a duplicate of the HelloWorld project worked in the projects/properties screen, but it does not create a folder to work in ? Do i need to make this myself ? (did see file/new/file…)
  • in Mbed, every project had its own settings file. how does this work in embitz ?
  • was the Build folder empty ? if not i did not compile helloworld but just used a downloaded one…(there is no warning stating a file already present)

I could follow the tutorial but it did lack some information:

  • more explanation regarding downloading the pokittoLib from github and how to add it to embitz (or the zip)
  • github is using a desktop app now
  • setting up a new project and how the structure should look. (maybe add a YourProject folder that is ready to go)

I am using mbed, but that doesnt give me clear examples of code so that is a bit hit and mis for me.

Using a desktop github client is completely optional.
Personally I manage all my github submissions and retrievals from the webpage.

There are a few rare exceptions where I use portable git because I want to do something drastic (i.e. change the commit history).

To use the examples all you have to do is grab the latest copy of the library from the PokittoLib repo on github, unzip it and use EmBitz to open the .ebp file.

From there, each example is a different ‘build target’, which you have to switch between to compile them.
The source code for the examples is in the ‘Examples’ folder and compiled examples end up in the ‘build’ folder.
Each example has its own build settings because each one is a different build target.

(I’m not sure about adding new build targets sadly, I haven’t got round to sorting all that out yet.)

Step3: “Open HelloWorld.epb”. I cloned the library but can’t find the HelloWorld.epb file…

Not sure if that’s a typo or if it’s out of date.
It should say “PokittoEmBitz.ebp”. (I’ll fix that momentarily.)
.epb is an EmBitz project file.

I also updated the picture.
From the previous picture it’s evident that there once was a HelloWorld.epb but this tutorial just wasn’t updated when the name changed.

@zer0 Thanks for bringing the issue up.

1 Like

How do I add an new program to the pokittoEmBitz? I have my .cpp and .h files.

It would be easier to just modify the hello world example for now.
I.e. just dump all your files in the hello world example folder and replace the hello world main with your main.

(That’s what I did for developing Noughts And Crosses and it worked fine.)

You’ll also need to use the UI to include them and assign them to the hello world build target. You can do that by right clicking on ‘examples’ in the file explorer and choosing ‘include recursive’ then picking the hello world folder (after copying your files over to it).

I’ll try to find some time to type up a tutorial on how to add a new build target.


I’m a skull of my word:


I downloaded PokittoLib and EmBitz and so far it is looking good. The tracker is selected as a target in the current project file and it compiles fine. However, if I change the target, for instance to “Hello World.cpp” I get an error:

||=== PokittoEmBitz, HelloWorld ===|
\PokittoLib-master\Pokitto\POKITTO_CORE\PokittoSound.cpp|815|undefined reference to `Pokitto::setHWvolume(unsigned char)'|
||=== Build finished: 1 errors, 134 warnings (0 minutes, 19 seconds) ===|

Do I have to change something in the setup when I select a different target?

Just a sec

1 Like

Fixing it right now



@gho , please go and fetch the latest version

Thanks! Going to try it out and will report back.

1 Like

Thanks again! Now it works!


I downloaded the IDE from the mirrored link,
downloaded PokittoLib and Examples (not mentioned in step 2) from GitHub and followed the remaining steps mentioned. But I think I’m missing something. After clicking (re)build. I get a bunch of inline variable errors in Pokitto_settings.h. Can someone tell me what I’m missing /doing wrong ?

Looks like you don’t have GCC set to C++17.

Thanks for the response @FManga I saw at C++flags under build options there is a line -std=c++17. Do I need to check another option?

1 Like