GithubHelp home page GithubHelp logo

Comments (12)

leptun avatar leptun commented on August 27, 2024 1

You might need this to upload the secondary language. Alternatively, you can use PrusaSlicer
avrdude-slic3r.zip

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

PS basically has a permanent home being open on my taskbar ;)

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

does that avrdude build let you only do the language flash or does it require the entire flash beforehand?

from mk404.

leptun avatar leptun commented on August 27, 2024

This avrdude is the identical program included in PrusaSlicer, but it it compiled separately. With it you first upload the firmware using the regular bootloader, then it reboots and on a second run of the program you also upload the language section. That part is done using the second bootloader found in the firmware.

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

This is interesting... for some reason when flashing with the bootloader entire chunks of flash do not get written.
image
Monitoring the UART input (trapping IRQ_UART_BYTE_IN) shows these same blank regions in the data...

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

this gets weirder... tapping the actual serial comms with socat shows the 0xFF bytes are are actually part of what is sent by avrdude-slicer.

Even more interesting, regular avrdude does not do this and the verification pass completes without issue.

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

This almost looks like a concurrency issue. I logged two flash cycles, one with avrdude-slic3r (left) and one with standard avrdude (right)
It's apparent the pages are both getting out of sync (page numbers diverge) and it seems like somehow when running avrdude-slic3r, it is actually clobbering its own written data by subsequently filling problem pages with junk and writing them again.
image

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

image
This almost looks like the slicer variant is writing pages in two chunks. Note the differences in the original page data line up with the 0xFB bytes in the second block.

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

I've found a fix, but I don't understand quite why. So apparently avrdude-slicer will do double programming passes on some blocks of flash memory. (i.e. write the pages a second time).

This fails because the simulator doesn't actually behave like flash memory - in reality, doing this would result in an &= of the value. I have a simavr fix for this that results in the avrdude verification pass.

@leptun does this behaviour ring any bells for you, or do you know whom we might ask for the reasoning behind this?

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

I've pushed the fix up to vintagep/simavr in the worktree_test branch. You will need to check it out and recompile simavr to see an effect.

from mk404.

leptun avatar leptun commented on August 27, 2024

Maybe avrdude-slic3r tries to insert the Percentage done frame in the middle of the write for some odd reason. Not sure what to say. You could ask @DRracer to ask the right person about this

from mk404.

vintagepc avatar vintagepc commented on August 27, 2024

Fair enough.
Though the data I'm looking at is the raw stk500 protocol, it's actually instructing it to write that block to flash memory.

from mk404.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.