So I noticed that this software is discontinued and maybe the functionality is included in the 4D Systems IDE? I am using Arduino IDE so is there a way to convert images to GCI/DAT files in the OSX environment?
Announcement
Collapse
No announcement yet.
Convert images to GCI format with Mac
Collapse
X
-
Good day,
The GCI and DAT files are generated internally by the Workshop4 IDE. Unfortunately, Workshop4 can only run in windows OS but it should be possible to use Workshop4 on a Mac using a VM running windows or using WINE or Parallels.
Best Regards,
-
Not sure what is the best way of reporting such a crash but here are the first screenshots from the Bug Report window. Let me know what information I can provide. The bug report mentions: "Bitmap image is not valid" but I could not yet figure out what bitmap is in question.
EDIT: added the bugreport.txt file as attachment.
Comment
-
It seems that the GC.EXE can convert the graphics just fine but there's just the issue of putting those files to the sd card and accessing from code:
1. Formatting the sd card (with a Mac)
The RMPET.EXE does open up directly with wine, but it does not recognize the sd card.
The sd card is recognized in winecfg and can be read/written e.g. from wine cmd. Also GC.EXE can see the sd card as E:\.
So looking at some of the older posts e.g. from here: https://forum.4dsystems.com.au/node/60333 I understood that the requirements for sd card formatting are (at least):
1. Partition type: FAT16 (e.g. 1GB)
2. Cluster size: 64kb
3. Skip the first 8192 sectors before the first partition
4. Second partition type: RAW (e.g. 1GB)
I did not quite find the right tools to set all these attributes. I tried:
- diskutil - but could not figure out if cluster size and partition start location could be set
- newfs_msdos - but not sure if -o hidden sectors or -r reserved sectors can be used to leave space before first partition
- GParted allowed me to leave space before the first partition (in MiB's) but did not allow to set the cluster size (could have been done afterwards I guess)
Anyhow, all the different ways of formatting the sd cards resulted into #error: FS could not start while running any of the example apps from under Arduino->Examples->SD(esp8266).
Any ideas are more than welcome... 🤔
Comment
-
DOUGH! It seems that the SD card examples cannot be run as-is. I thought that when the Arduino IDE says "Examples for 4D Systems gen4 IoD Range" they should be working fine. Looking at the GFX4d source code, there was plenty of SD related initialization done and initializing GFX4d before the SD testing did the trick and I could read the sd card.
Still, none of the GFX4d examples display any graphics so maybe I need to copy the .cgi and .dat files to the sd card manually first...
EDIT: Copying the files from under the SDCardFiles directory into the sd card root does not seem to help. Still cannot get the examples with graphics to show anything.Last edited by jukkar; 20 October 2020, 07:41 PM.
-
-
Hi,
If you really want to do this on Mac, you might consider using a Virtual Machine like VMware fusion to run native Windows OS environment to fully support Workshop4 IDE, Wine may not be the best way. Can I ask what uSD card you are using, if it is 4GB then you don't need to partition it, just needs to format as MS DOS FAT16, http://arquivo.splat-n.com/scripts/f...6-in-mac-os-x/. Then again, it is still best to use a windows machine to do this operations including file transfers, as Mac sometimes inserts additional hidden files into the drive.
Best Regards,
Comment
-
Well, the current conclusion of all this - should anyone be interested in knowing what works with Mac when it comes to sd cards and images - is that: keep using your Mac, no VMs are needed.
After plenty of assistance from Paul (4D Systems), things that work with: Mac, Arduino IDE, GEN4-IOD devices, sd cards, and images are:
SD Card- Can be formatted to FAT-16 or FAT-32 using Mac:
- diskutil partitionDisk /dev/disk2 MBR "MS-DOS FAT16" NONAME 1GB free "" 0B (creates one partition and the remainder as free)
- Can be generated on Mac running wine GC.EXE under <Workstation4 install dir>/DEPafter installing wine and Workstation4. The GCI files generated by the Workstation4 on Windows, GC.EXE on Windows or GC.EXE on Mac under Wine were all identical.
- Generated files can then be copied to the sd card from the command line (or Finder I believe)
A minimal Arduino example that simply displays one image:
Code:#include "GFX4d.h" GFX4d gfx = GFX4d(); void setup() { gfx.begin(); gfx.Cls(); gfx.BacklightOn(true); gfx.Orientation(PORTRAIT); gfx.Open4dGFX("IMAGES"); gfx.UserImage(0); } void loop() { // put your main code here, to run repeatedly: yield(); // Required for ESP }
Most likely there was nothing new here but since I started with the examples from here: https://github.com/4dsystems/GFX4d/t...r/src/Examples - that I could not get to display any graphics, I spend quite some time looking from the wrong places.
Comment
- Can be formatted to FAT-16 or FAT-32 using Mac:
Comment