Can't find any working Emulator solution

Project ABE seems to not be working. At least not compiling. So I downloaded the Arduino IDE and compile it to a bin file myself. But had no such luck with it there either, running into a cc1.exe error.

So I really don’t know where to start now.

Unfortunately building in the emulator is broken I’m working on hosting it natively but it’s gonna take some time to be able to dedicate working with the server.

What is the environment that you are running arduino on that gets you that error? And you might also try the arduino forums for support as well on general topics like that.

When do you get the error can you give more details?

The error was:
cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

I was able to fix it using this homemade board instead:
https://community.arduboy.com/t/arduboy-code-not-compiling-using-arduino-cli-exe/10346/5

I was using this board. It was giving me the error:
https://arduboy.github.io/board-support/package_arduboy_index.json

I now have it working with this method. A little tedious using the IDE and having to export the binary manually. But its working. Already got a little dude moving around.

If you swap to VSCode, you could possibly write a script that does the build and launches the emulator.

2 Likes

Wow thats bizarre why would a certain board file throw an error like that, @mlxxxp @Mr.Blinky any suggestion?

I’ve had a decent experience with using the arduous core of retroarch. I use VS code with the “Microsoft C/C++ Extension” plugin and arduino-cli to compile.

Install arduino avr core and arduboy library

arduino-cli core install arduino:avr
arduino-cli lib install Arduboy2

Configure the VS code “Microsoft C/C++ Extension” plugin to include your arduino libraries. This will enable auto-complete.
In VS code do CTRL+SHIFT+P, then type “C/C++: Edit Configurations (JSON)” and add the libraries folder to includePath:

"includePath": [
                "${workspaceFolder}/**",
                "C:/Users/<<your_username>>/Documents/Arduino/libraries/**",
            ],

Then I use the a .bat file to compile and run your code in retroarch. It saves your build in the “builds” folder:

@echo OFF

REM Delete all files in the build directory, otherwise you might run an old build if a compile error occured
rd /s /q builds

REM Compile
arduino-cli compile --fqbn arduino:avr:leonardo --output-dir ./builds

REM Run
C:\RetroArch-Win64\retroarch.exe -L C:\RetroArch-Win64\cores\arduous_libretro.dll ./builds/YourGame.ino.hex

Did a clean install of the Arduino IDE 2.0.x and installed the Arduboy board file and I get the same error.
So the board file doesn’t work for Arduino IDE 2.0.x (doesn’t select / install the right toolset)

@beandream I recommend to use the Legacy Arduino IDE 1.8.19 with that you can also make use of the Arduboy FX plugin

1 Like

There have been reports of this issue before. I haven’t looked into it extensively.

So as of currently, board file not compatible with arduino 2.0 for unknown reasons?

Could we post the error to Arduino and get them to fix it? They like us! :slight_smile:

I went through the Arduino board file documentation and didn’t see anything that indicated that something had to be changed for 2.0, so it wasn’t obvious why it no longer works. I’ve been very short on time lately and haven’t had a chance to investigate in more detail.

I think the problem is the tool dependencies section in the json file. They refer to older versions that now do not seem to work properly.

Best is to leave the tool dependencies section empty (as I do with the homemade package) so the Arduino tools are used.

Thanks @Mr.Blinky. I’ve made this change. Do you know if it will be picked up automatically or do I have to do something to have it take effect?

If you update the version number in the json to an higher number. The Arduino IDE will promt with an update or you can do an update through the boardmanager if the option to check for updates was disabled.

1 Like

I didn’t change the version number, since only the JSON file changed. I’m hoping at worst removing then installing Arduboy using the Boards Manager will work.

I’d appreciate it if anyone would test this, with both V1.x and V2.x of the IDE. I found time to make the changes but don’t have time to test them, at the moment.

with the same version number. it’s more work to update the package. you need to unistall the package first and then reinstall it. to uninstall it you have to go to the board manager and move the mouse pointer over the installed text for it to change into an uninstall option and click it.

after installing the package again the error no longer occurs.

1 Like

I didn’t want to update the version because nothing changed in the package file that the version applies to. Plus, I didn’t have time to update the version, re-package and calculate a new checksum.

You don’t need to update the (version of the) zip file. Just the version number in the json file. Technically the json file has changed (no longer depends on the old tools) so it’s worth a new version number.

In every Boards Manager JSON file I looked at the “version” in the JSON matched the version used in the name of the archive file.

Anyway, I’ve taken the time to do it properly and created a new section in the JSON and a new version 1.1.0 archive file (even thought the contents of the archive are identical to V1.0.0). Hopefully, this will cause a prompt for updating and work properly with 1.x and 2.x IDE versions.

2 Likes