[Solved] Embitz, did I mess it up?

I am using Embitz but everything i build seems to be compiled for the wrong screenmode.

To see of it was my code making a mess i checked the example files and compiled the Bitmap example.

  • My settings.h in the bitmap example

#define PROJ_HIRES 0 //1 = high resolution (220x176) , 0 = low resolution fast mode (110x88)

  • build target set for Bitmap

  • on Pokitto it displays a low res image on the left upper side of the screen, screen itself seems to stay in hires mode

  • using a old .Bin and everything works fine on Pokitto, so apparently i changed something in Embitz ?

Is it somehow linked to a setting for hi res ?, how could i check ?

  • Have you checked to see if the file is actually compiling?
  • Have you checked the date on the .bin file to make sure it’s being overwritten?
  • Are you definitely looking at the MySettings.h that Bitmap is using?
  • Have you tried moving your comment above the line with the define instead of putting it on the same line?
  • Have you checked to see if the file is actually compiling?

Yep

  • Have you checked the date on the .bin file to make sure it’s being overwritten?

Even removed it to make sure

  • Are you definitely looking at the MySettings.h that Bitmap is using?

As far as I can see it is the correct one.

  • Have you tried moving your comment above the line with the define instead of putting it on the same line?

Not sure what you mean, i did not alter the my settings from the bitmap example at all.

Just tried to do a build for my own program, this now seems to display on the correct screenmode. But the bitmap i am using is nothing more then a blob.

I am going to try to transfer the image to mbed to check that it is correct.

Solved, I accidentally created a folder in Others\Examples\Sketchi
This folder was empty, but seems to mess with the screenmodes somehow ?

Strange, that shouldn’t have made a difference.

Also I just had a go at compiling Bitmap in both hires and lores mode and the default sprite doesn’t display correctly in hires mode.

Well, after removing the empty folder the bitmap example was compiled correctly.

My own program is still very colorful(although it should be black/white), but I believe i am setting the pallete wrong somewhere.

Should the bitmap example be displayed correct in hi res mode ?

Did you remeber to rebuild completely?

Probably not, I think the sprite formats are different for hires and low res.

If you want to find out what colours different palette indexes are,
use the rectangle drawing functions to draw a filled in rectangle of each colour.

1 Like

I use Build target, i assume you mean Rebuild all target files ?. When do i need to use that ?

ah, found it :


Final step 6: compile, get binary and put it on Pokitto, reset
To compile your program, press the build button shown below.

Immediately on the right side of the “buld” button is the “rebuild” button.

Remember to rebuild completely if you change the project #defines or stuff inside My_settings.h. If you do not, the changes in graphics mode etc will not be done, because only a rebuild will recompile them

Your bin binary file will now appear in the /build folder. Put Pokitto in to USB mass storage mode. When in USB mass storage mode, the Pokitto appears as a storage device with the name CRP_DISABLED (this funny name only means that the device is not write-protected).

Finally delete existing “firmware.bin” and copy the new bin you just made into the Pokitto. Reset to run your program.

Happy coding!

  • The Rebuild button is indeed there as a icon, but not from the pulldown menu. There it is only as Rebuild all targets
1 Like

That might explain why removing the folder affected it.
It’s possible that EmBitz recognised the folder being removed as a ‘change’ and forced a rebuild.

Rebuild is actually a shortcut for Clean target and then Build target.
I usually use clean target from time to time out of habit.

Ah, that would be it :smile:

I tried the bitmap on mbed, its fine there.

In Embitz it is working the same as with the bitmap example you tried, in low-res it is okay. But in Hi-res it is mixed up.

1 Like

I’m going to mark this one ‘solved’.
The issue was almost certainly EmBitz using cached build settings to avoid rebuilding the whole library from scratch.

agreed :blush:

1 Like