Makelangelo firmware compiling issue

Shop Forum Makelangelo Polargraph Art Robot Makelangelo firmware compiling issue

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #28362
    strangeloop
    Participant

    Hey all,

    So I’m trying to build a makelangelo bot using a spare Ender3 mainboard I had lying around, and I’m running into some issues getting the firmware flashed onto it. I’ve created a new pin file for the creality board, according to the instructions here: https://www.marginallyclever.com/2020/05/how-to-add-a-new-pcb-to-makelangelo-firmware/, and based on the pin file for the same board from the Marlin firmware github.

    I was able to flash a bootloader onto the creality board, but unfortunately when I then try and flash the Makelangelo firmware, I get the following error:

    sketch/motor.cpp.o (symbol from plugin): In function `servos’:
    (.text+0x0): multiple definition of `__vector_13′
    sketch/MServo.cpp.o (symbol from plugin):(.text+0x0): first defined here
    collect2: error: ld returned 1 exit status
    exit status 1
    Error compiling for board Sanguino.

    Did I mess something up in the pin file or is this something completely different? Anybody ever seen this before? Insights? I’m super stoked to get this thing assembled and try it out so anything anybody can offer I would be super thankful for!

    #28418
    Dan
    Keymaster

    This compile issue is being addressed in the development branch on github:

    https://github.com/marginallyclever/makelangelo-firmware

    Please follow along there and let us know if the development version now runs OK for you. I look forward to getting this fixed and put to rest.

    #29345
    3pleL
    Participant

    Hi everybody,

    since I haven’t seen anyone else try to bring purpose to an old ender 3 mainboard via the makelangelo firmware, I’d like to reactivate this thread.

    I’ve gotten so far as to compile all default projects. Then I created the ender 3 board file, entry in configure.h and the required env in platformio.ini.
    (Btw. the pin configuration is nearly exactly the same as in sanguinolulu.)

    All sources are currently available in the feature branch “feature/ender3” in my fork of this project.

    Unfortuantely I get a linker error similar to the one above but a little different:

    linking .pio\build\ENDER3\firmware.elf
    src\motor.cpp: In function '__vector_13':
    src\motor.cpp:695:25: error: variable 'limit' with dynamic initialization put into program memory area
       static const uint32_t limit[] PROGMEM = {
                             ^
    lto-wrapper.exe: fatal error: avr-g++ returned 1 exit status
    compilation terminated.

    (of course I googled that error and found some results which were not helpful for me-.-)
    Is there anybody who could shed some light on this?

    Greetings 3pleL

    #29348
    Dan
    Keymaster

    Are you compiling with VSCode? The fatal error does not happen in VSCode.
    The scope is limited to calc_timer() and the contents are calculated once at compile-time, meaning the values are not dynamic.

    #29350
    3pleL
    Participant

    Hi Dan,
    thanks for your reply!
    Yes I’m using vs code for compiling.
    The build console output is as seen below (maybe this gives more substantial information):

    Processing ENDER3 (platform: atmelavr; board: ATmega1284P; framework: arduino)
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via <code>-v, --verbose</code> option
    CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/ATmega1284P.html
    PLATFORM: Atmel AVR (3.2.0) > ATmega1284P
    HARDWARE: ATMEGA1284P 16MHz, 16KB RAM, 128KB Flash
    DEBUG: Current (simavr) On-board (simavr)
    PACKAGES:
     - framework-arduino-avr-mightycore 2.1.1
     - toolchain-atmelavr 1.70300.191015 (7.3.0)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 11 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- <SPI> 1.0
    |-- <EEPROM> 2.0
    |-- <SoftwareSerial> 1.0
    |-- <Wire> 1.0
    |-- <Servo (MightyCore)> 1.1.1
    Building in release mode
    Linking .pio\build\ENDER3\firmware.elf
    src\motor.cpp: In function '__vector_13':
    src\motor.cpp:679:25: error: variable 'limit' with dynamic initialization put into program memory area
       static const uint32_t limit[] PROGMEM = {
                             ^
    lto-wrapper.exe: fatal error: avr-g++ returned 1 exit status
    compilation terminated.
    c:/users/linux/.platformio/packages/toolchain-atmelavr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed
    collect2.exe: error: ld returned 1 exit status
    *** [.pio\build\ENDER3\firmware.elf] Error 1

    I’m using vs code version:

    Version: 1.53.2 (user setup)
    Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
    Date: 2021-02-11T11:48:04.245Z
    Electron: 11.2.1
    Chrome: 87.0.4280.141
    Node.js: 12.18.3
    V8: 8.7.220.31-electron.0
    OS: Windows_NT x64 10.0.19041
    #29352
    Dan
    Keymaster

    Maybe best if you come to the discord group and more people with expertise can look at this together. https://discord.gg/QtvHqAv8yp

    #29355
    3pleL
    Participant

    Thanks for the invite – I just joined there:)

    Anyway I made some slight progress – the firmware now compiles.

    The issue might have something to do with the selected toolchain.
    As pointed here avr-gcc v7.2.0 throws a similar error.
    So I changed the platform to an older version platform = [email protected] and it compiles just fine.

    So my next steps will be:
    – check what most recent version of the platform will work
    – get the hardware programmed with the bootloader and the software for testing
    I hope to get around doing this next week.

    Anyway I’ll keep this thread up to date with my progress.

    Greetings,
    3pleL

    #29368
    3pleL
    Participant

    Hello everybody,

    just a quick info. I haven’t made much progress, but got the board flashed with the bootloader.

    After uploading the compiled firmware, unfortunately I don’t get any output on the serial monitor. I don’t know why, but I’ll investigate this as far as it is possible without a proper debugger (obvious things checked already – right com port, baudrate of 57600).

    Greetings,
    3pleL

    #29370
    3pleL
    Participant

    Hi everyboody,
    I just verified the hardware, serial messages are basically sent.

    From my serial debugging so far, I’ve found out that there seems to be an issue with serial messages not being sent anymore.
    This happens after setting up the servo in function motor_setup(). So I suspect the servo library and it’s hardware timers may be colliding with the UART or something along this line.

    Unfortunately I don’t have a real hardware debugger to investigate this properly.
    Maybe somebody else has experienced something alike?
    Should I open a issue on that topic so that someone with the required hardware could investigate this further?

    As an alternative temporary workaround: I disabled servos by setting NUM_SERVOS to 0 (in polargraph.h because my build uses this machine style).

    Now I get the expected messages and the periodic parser newline char as it should be.

    That’s it for today – next time I’ll connect the board to the pc software and maybe even connect the motors.

    Greetings,
    3pleL

    #29405
    3pleL
    Participant

    Hello everybody,
    due to a shift in priorities, my contribution to this awesome project is on hold.
    But if anybody would like to continue this journey of repurposing the Ender 3 boards – feel free to take a look at the work done so far in my fork:)

    #29503
    Jordan Pinker
    Participant

    Thank you very much for the information

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.