IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Arduino Discussion :

Mémoire flash HS ?


Sujet :

Arduino

  1. #1
    Membre chevronné Avatar de electroremy
    Homme Profil pro
    Ingénieur sécurité
    Inscrit en
    Juin 2007
    Messages
    996
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Ingénieur sécurité
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2007
    Messages : 996
    Par défaut Mémoire flash HS ?
    Bonjour,

    je suis en train de modifier le firmware de mon imprimante 3D Prusa I3 MK2s original

    Elle utilise une carte RAMBo1.3a, basée sur un ATmega2560

    J'ai réussi à faire plusieurs modifications (prise en charge d'une sonde SUPERPINDA, et d'un capteur de filament)

    Après flashage de mon nouveau firmware tout est OK

    Je continue le développement, je reflash à nouveau le firmware et j'ai une erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    avrdude-slic3r -v -p atmega2560 -c wiring -P COM4 -b 115200 -D -U flash:w:0:C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:i
     
    avrdude-slic3r: Version 6.3-20160220-prusa3d, compiled on Apr 10 2025 at 13:39:24
                    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                    Copyright (c) 2007-2014 Joerg Wunsch
     
     
                    Using Port                    : COM4
                    Using Programmer              : wiring
                    Overriding Baud Rate          : 115200
                    AVR Part                      : ATmega2560
                    Chip Erase delay              : 9000 us
                    PAGEL                         : PD7
                    BS2                           : PA0
                    RESET disposition             : dedicated
                    RETRY pulse                   : SCK
                    serial program mode           : yes
                    parallel program mode         : yes
                    Timeout                       : 200
                    StabDelay                     : 100
                    CmdexeDelay                   : 25
                    SyncLoops                     : 32
                    ByteDelay                     : 0
                    PollIndex                     : 3
                    PollValue                     : 0x53
                    Memory Detail                 :
     
                                             Block Poll               Page                       Polled
                      Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                      eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                      flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
                      lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                      signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
     
                    Programmer Type : Wiring
                    Description     : Wiring
                    Programmer Model: AVRISP
                    Hardware Version: 15
                    Firmware Version Master : 2.10
                    Vtarget         : 0,0 V
                    SCK period      : 0,1 us
     
    avrdude-slic3r: AVR device initialized and ready to accept instructions
     
    Reading | ################################################## | 100% 0,01s
     
    avrdude-slic3r: Device signature = 0x1e9801 (probably m2560)
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: reading input file "C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex"
    avrdude-slic3r: writing flash (253318 bytes):
    avrdude-slic3r: stk500v2_command(): command failed
     
    Writing | ################################################## | 100% 43,53s
     
    avrdude-slic3r: 253318 bytes of flash written
    avrdude-slic3r: verifying flash memory against C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:
    avrdude-slic3r: load data flash data from input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:
    avrdude-slic3r: input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex contains 253318 bytes
    avrdude-slic3r: reading on-chip flash data:
     
    Reading | ################################################## | 100% 32,44s
     
    avrdude-slic3r: verifying ...
    avrdude-slic3r: verification error, first mismatch at byte 0x3c000
                    0x22 != 0xbb
    avrdude-slic3r: verification error; content mismatch
     
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: safemode: Fuses OK (E:FD, H:D0, L:FF)
     
    avrdude-slic3r done.  Thank you.

    J'ai redémarré l'imprimante, redémarré l'ordinateur, c'est toujours la même erreur "vérification error, first mismatch at byte 0x3c000 0x22 != 0xbb"

    Et bien sûr, impossible d'utiliser l'imprimante, qui ne fonctionne plus.

    Le microcontrôleur de ma carte RAMBo1.3a serait-il déjà mort ? Si c'est le cas, il faut remplacer toute la carte (le microcontrôleur étant un boiter CMS soudé avec de nombreuses broches)

    Je n'avais mis à jour le firmware que 2 ou 3 fois...
    Quand deux personnes échangent un euro, chacun repart avec un euro.
    Quand deux personnes échangent une idée, chacun repart avec deux idées.

  2. #2
    Membre chevronné Avatar de electroremy
    Homme Profil pro
    Ingénieur sécurité
    Inscrit en
    Juin 2007
    Messages
    996
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Ingénieur sécurité
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2007
    Messages : 996
    Par défaut
    Bonjour,

    Après d'autres recherches :
    Le problème pourrait venir de la première mise à jour du firmware qui aurait écrasé le bootloader, ce qui empêche ensuite de mettre à nouveau à jour le firmware
    C'est assez tordu car la première mise à jour se passe bien, donc on ne pense pas que le problème vient de là.

    https://github.com/prusa3d/Prusa-Firmware/issues/910
    https://arduino.stackexchange.com/qu...fication-error
    https://github.com/MarlinFirmware/Marlin/issues/17598
    https://forum.prusa3d.com/forum/orig...iled-firmware/
    https://reprap.org/forum/read.php?13,824293,824442

    J'ai retrouvé dans mes affaires un USBasp qui permet de programmer des Arduino directement via leur port ICSP
    Mais il n'est pas détecté sur mon ordinateur...

    Je tente autre chose : reflasher le firmware original de l'imprimante 1_75mm_MK2-RAMBo13a-E3Dv6full.hex avec PrusaSlicer
    Surprise : ça fonctionne (mais je ne sais pas pourquoi)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    avrdude-slic3r -v -p atmega2560 -c wiring -P COM4 -b 115200 -D -U flash:w:0:C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\1_75mm_MK2-RAMBo13a-E3Dv6full.hex:i
     
    avrdude-slic3r: Version 6.3-20160220-prusa3d, compiled on Apr 10 2025 at 13:39:24
                    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                    Copyright (c) 2007-2014 Joerg Wunsch
     
     
                    Using Port                    : COM4
                    Using Programmer              : wiring
                    Overriding Baud Rate          : 115200
                    AVR Part                      : ATmega2560
                    Chip Erase delay              : 9000 us
                    PAGEL                         : PD7
                    BS2                           : PA0
                    RESET disposition             : dedicated
                    RETRY pulse                   : SCK
                    serial program mode           : yes
                    parallel program mode         : yes
                    Timeout                       : 200
                    StabDelay                     : 100
                    CmdexeDelay                   : 25
                    SyncLoops                     : 32
                    ByteDelay                     : 0
                    PollIndex                     : 3
                    PollValue                     : 0x53
                    Memory Detail                 :
     
                                             Block Poll               Page                       Polled
                      Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                      eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                      flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
                      lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                      signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
     
                    Programmer Type : Wiring
                    Description     : Wiring
                    Programmer Model: AVRISP
                    Hardware Version: 15
                    Firmware Version Master : 2.10
                    Vtarget         : 0,0 V
                    SCK period      : 0,1 us
     
    avrdude-slic3r: AVR device initialized and ready to accept instructions
     
    Reading | ################################################## | 100% 0,01s
     
    avrdude-slic3r: Device signature = 0x1e9801 (probably m2560)
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: reading input file "C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\1_75mm_MK2-RAMBo13a-E3Dv6full.hex"
    avrdude-slic3r: writing flash (245286 bytes):
    avrdude-slic3r: stk500v2_command(): command failed
     
    Writing | ################################################## | 100% 42,97s
     
    avrdude-slic3r: 245286 bytes of flash written
    avrdude-slic3r: verifying flash memory against C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\1_75mm_MK2-RAMBo13a-E3Dv6full.hex:
    avrdude-slic3r: load data flash data from input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\1_75mm_MK2-RAMBo13a-E3Dv6full.hex:
    avrdude-slic3r: input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\1_75mm_MK2-RAMBo13a-E3Dv6full.hex contains 245286 bytes
    avrdude-slic3r: reading on-chip flash data:
     
    Reading | ################################################## | 100% 31,42s
     
    avrdude-slic3r: verifying ...
    avrdude-slic3r: 245286 bytes of flash verified
     
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: safemode: Fuses OK (E:FD, H:D0, L:FF)
     
    avrdude-slic3r done.  Thank you.

    Bonne nouvelle l'imprimante n'est pas HS
    Et le bootloader serait donc intact (sinon, impossible de charger le firmware d'origine)

    Je me dis que le firmware original a dû remettre l'imprimante dans un état correct.
    Je tente alors de flasher mon firmware

    Et j'ai la même erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    avrdude-slic3r -v -p atmega2560 -c wiring -P COM4 -b 115200 -D -U flash:w:0:C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:i
     
    avrdude-slic3r: Version 6.3-20160220-prusa3d, compiled on Apr 10 2025 at 13:39:24
                    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                    Copyright (c) 2007-2014 Joerg Wunsch
     
     
                    Using Port                    : COM4
                    Using Programmer              : wiring
                    Overriding Baud Rate          : 115200
                    AVR Part                      : ATmega2560
                    Chip Erase delay              : 9000 us
                    PAGEL                         : PD7
                    BS2                           : PA0
                    RESET disposition             : dedicated
                    RETRY pulse                   : SCK
                    serial program mode           : yes
                    parallel program mode         : yes
                    Timeout                       : 200
                    StabDelay                     : 100
                    CmdexeDelay                   : 25
                    SyncLoops                     : 32
                    ByteDelay                     : 0
                    PollIndex                     : 3
                    PollValue                     : 0x53
                    Memory Detail                 :
     
                                             Block Poll               Page                       Polled
                      Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                      eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                      flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
                      lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                      signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
     
                    Programmer Type : Wiring
                    Description     : Wiring
                    Programmer Model: AVRISP
                    Hardware Version: 15
                    Firmware Version Master : 2.10
                    Vtarget         : 0,0 V
                    SCK period      : 0,1 us
     
    avrdude-slic3r: AVR device initialized and ready to accept instructions
     
    Reading | ################################################## | 100% 0,01s
     
    avrdude-slic3r: Device signature = 0x1e9801 (probably m2560)
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: reading input file "C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex"
    avrdude-slic3r: writing flash (253318 bytes):
    avrdude-slic3r: stk500v2_command(): command failed
     
    Writing | ################################################## | 100% 43,53s
     
    avrdude-slic3r: 253318 bytes of flash written
    avrdude-slic3r: verifying flash memory against C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:
    avrdude-slic3r: load data flash data from input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:
    avrdude-slic3r: input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex contains 253318 bytes
    avrdude-slic3r: reading on-chip flash data:
     
    Reading | ################################################## | 100% 32,44s
     
    avrdude-slic3r: verifying ...
    avrdude-slic3r: verification error, first mismatch at byte 0x3c000
                    0x02 != 0xbb
    avrdude-slic3r: verification error; content mismatch
     
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: safemode: Fuses OK (E:FD, H:D0, L:FF)
     
    avrdude-slic3r done.  Thank you.
    A noter la différence de taille :

    1_75mm_MK2-RAMBo13a-E3Dv6full.hex : 689 952 octets

    Firmware.ino.rambo.hex : 712 542 octets


    Mais là où c'est incompréhensible, c'est que mon firmware personnalisé avait quand même fonctionné UNE SEULE FOIS.
    Donc, ce premier flashage de mon firmware personnalisé à "abîmé" quelque chose qui empêche de le charger encore...
    Mais qui n'empêche pas de charger le firmware d'origine, sans que le chargement de ce firmware d'origine restaure ce qui avait été abîmé

    Je pensais avoir trouvé une solution :
    Un warning me disait dans l'IDE Arduino que le fichier stk500boot_v2_mega2560.hex était manquant dans arduino-1.6.13\hardware\marlin\avr\bootloaders
    J'ai trouvé et placé le fichier manquant, et obtenu un fichier Firmware.ino.with_bootloader.rambo.hex
    Mais quand je flash ce fichier dans l'imprimante, j'ai toujours cette erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    avrdude-slic3r -v -p atmega2560 -c wiring -P COM4 -b 115200 -D -U flash:w:0:C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex:i
     
    avrdude-slic3r: Version 6.3-20160220-prusa3d, compiled on Apr 10 2025 at 13:39:24
                    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                    Copyright (c) 2007-2014 Joerg Wunsch
     
     
                    Using Port                    : COM4
                    Using Programmer              : wiring
                    Overriding Baud Rate          : 115200
                    AVR Part                      : ATmega2560
                    Chip Erase delay              : 9000 us
                    PAGEL                         : PD7
                    BS2                           : PA0
                    RESET disposition             : dedicated
                    RETRY pulse                   : SCK
                    serial program mode           : yes
                    parallel program mode         : yes
                    Timeout                       : 200
                    StabDelay                     : 100
                    CmdexeDelay                   : 25
                    SyncLoops                     : 32
                    ByteDelay                     : 0
                    PollIndex                     : 3
                    PollValue                     : 0x53
                    Memory Detail                 :
     
                                             Block Poll               Page                       Polled
                      Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                      eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                      flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
                      lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                      signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
     
                    Programmer Type : Wiring
                    Description     : Wiring
                    Programmer Model: AVRISP
                    Hardware Version: 15
                    Firmware Version Master : 2.10
                    Vtarget         : 0,0 V
                    SCK period      : 0,1 us
     
    avrdude-slic3r: AVR device initialized and ready to accept instructions
     
    Reading | ################################################## | 100% 0,01s
     
    avrdude-slic3r: Device signature = 0x1e9801 (probably m2560)
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: reading input file "C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex"
    avrdude-slic3r: writing flash (261406 bytes):
    avrdude-slic3r: stk500v2_command(): command failed
     
    Writing | ################################################## | 100% 44,57s
     
    avrdude-slic3r: 261406 bytes of flash written
    avrdude-slic3r: verifying flash memory against C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex:
    avrdude-slic3r: load data flash data from input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex:
    avrdude-slic3r: input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex contains 261406 bytes
    avrdude-slic3r: reading on-chip flash data:
     
    Reading | ################################################## | 100% 33,36s
     
    avrdude-slic3r: verifying ...
    avrdude-slic3r: verification error, first mismatch at byte 0x3c000
                    0x02 != 0xbb
    avrdude-slic3r: verification error; content mismatch
     
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: safemode: Fuses OK (E:FD, H:D0, L:FF)
     
    avrdude-slic3r done.  Thank you.
    Je suis totalement PERDU

    Visiblement, le bootloader n'a rien à voir avec mon problème.
    La taille du programme serait trop grande ?
    Mais alors pourquoi ça a fonctionné la première fois et pas les fois suivantes ?
    Quand deux personnes échangent un euro, chacun repart avec un euro.
    Quand deux personnes échangent une idée, chacun repart avec deux idées.

  3. #3
    Membre chevronné Avatar de electroremy
    Homme Profil pro
    Ingénieur sécurité
    Inscrit en
    Juin 2007
    Messages
    996
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Ingénieur sécurité
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2007
    Messages : 996
    Par défaut
    Nouvelle tentative : réduire la taille du code...

    J'ai trouvé une façon efficace de le faire : retirer les langues (les textes sont en PROGMEM) pour ne laisser que l'anglais. De toutes façon la MK2s ne proposait pas le Français

    100 Ko de gagnés quand même !

    Alors là, c'est bizarre :

    Si je flash la version avec Bootloader (Firmware.ino.with_bootloader.rambo.hex - 607 ko) j'ai une erreur... mais l'imprimante fonctionne correctement y compris avec mes modifications :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    avrdude-slic3r -v -p atmega2560 -c wiring -P COM4 -b 115200 -D -U flash:w:0:C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex:i
     
    avrdude-slic3r: Version 6.3-20160220-prusa3d, compiled on Apr 10 2025 at 13:39:24
                    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                    Copyright (c) 2007-2014 Joerg Wunsch
     
     
                    Using Port                    : COM4
                    Using Programmer              : wiring
                    Overriding Baud Rate          : 115200
                    AVR Part                      : ATmega2560
                    Chip Erase delay              : 9000 us
                    PAGEL                         : PD7
                    BS2                           : PA0
                    RESET disposition             : dedicated
                    RETRY pulse                   : SCK
                    serial program mode           : yes
                    parallel program mode         : yes
                    Timeout                       : 200
                    StabDelay                     : 100
                    CmdexeDelay                   : 25
                    SyncLoops                     : 32
                    ByteDelay                     : 0
                    PollIndex                     : 3
                    PollValue                     : 0x53
                    Memory Detail                 :
     
                                             Block Poll               Page                       Polled
                      Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                      eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                      flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
                      lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                      signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
     
                    Programmer Type : Wiring
                    Description     : Wiring
                    Programmer Model: AVRISP
                    Hardware Version: 15
                    Firmware Version Master : 2.10
                    Vtarget         : 0,0 V
                    SCK period      : 0,1 us
     
    avrdude-slic3r: AVR device initialized and ready to accept instructions
     
    Reading | ################################################## | 100% 0,01s
     
    avrdude-slic3r: Device signature = 0x1e9801 (probably m2560)
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: reading input file "C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex"
    avrdude-slic3r: writing flash (261406 bytes):
    avrdude-slic3r: stk500v2_command(): command failed
     
    Writing | ################################################## | 100% 38,01s
     
    avrdude-slic3r: 261406 bytes of flash written
    avrdude-slic3r: verifying flash memory against C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex:
    avrdude-slic3r: load data flash data from input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex:
    avrdude-slic3r: input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.with_bootloader.rambo.hex contains 261406 bytes
    avrdude-slic3r: reading on-chip flash data:
     
    Reading | ################################################## | 100% 27,98s
     
    avrdude-slic3r: verifying ...
    avrdude-slic3r: verification error, first mismatch at byte 0x3e1b9
                    0x79 != 0x72
    avrdude-slic3r: verification error; content mismatch
     
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: safemode: Fuses OK (E:FD, H:D0, L:FF)
     
    avrdude-slic3r done.  Thank you.


    En revanche, si je flash la version sans bootloader (Firmware.ino.rambo.hex - 600 ko), le flashage est un succès, et tout fonctionne correctement bien sûr :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    avrdude-slic3r -v -p atmega2560 -c wiring -P COM4 -b 115200 -D -U flash:w:0:C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:i
     
    avrdude-slic3r: Version 6.3-20160220-prusa3d, compiled on Apr 10 2025 at 13:39:24
                    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                    Copyright (c) 2007-2014 Joerg Wunsch
     
     
                    Using Port                    : COM4
                    Using Programmer              : wiring
                    Overriding Baud Rate          : 115200
                    AVR Part                      : ATmega2560
                    Chip Erase delay              : 9000 us
                    PAGEL                         : PD7
                    BS2                           : PA0
                    RESET disposition             : dedicated
                    RETRY pulse                   : SCK
                    serial program mode           : yes
                    parallel program mode         : yes
                    Timeout                       : 200
                    StabDelay                     : 100
                    CmdexeDelay                   : 25
                    SyncLoops                     : 32
                    ByteDelay                     : 0
                    PollIndex                     : 3
                    PollValue                     : 0x53
                    Memory Detail                 :
     
                                             Block Poll               Page                       Polled
                      Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                      ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                      eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                      flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
                      lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                      calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                      signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
     
                    Programmer Type : Wiring
                    Description     : Wiring
                    Programmer Model: AVRISP
                    Hardware Version: 15
                    Firmware Version Master : 2.10
                    Vtarget         : 0,0 V
                    SCK period      : 0,1 us
     
    avrdude-slic3r: AVR device initialized and ready to accept instructions
     
    Reading | ################################################## | 100% 0,01s
     
    avrdude-slic3r: Device signature = 0x1e9801 (probably m2560)
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: reading input file "C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex"
    avrdude-slic3r: writing flash (218386 bytes):
    avrdude-slic3r: stk500v2_command(): command failed
     
    Writing | ################################################## | 100% 38,01s
     
    avrdude-slic3r: 218386 bytes of flash written
    avrdude-slic3r: verifying flash memory against C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:
    avrdude-slic3r: load data flash data from input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex:
    avrdude-slic3r: input file C:\OneDrive\DATA\DONNEES\_Impr3D\SuperPinda_MK2s\Prusa-Firmware-3.2.3\Firmware\Firmware.ino.rambo.hex contains 218386 bytes
    avrdude-slic3r: reading on-chip flash data:
     
    Reading | ################################################## | 100% 27,99s
     
    avrdude-slic3r: verifying ...
    avrdude-slic3r: 218386 bytes of flash verified
     
    avrdude-slic3r: safemode: hfuse reads as D0
    avrdude-slic3r: safemode: efuse reads as FD
    avrdude-slic3r: safemode: Fuses OK (E:FD, H:D0, L:FF)
     
    avrdude-slic3r done.  Thank you.

    Ca fonctionne mais je ne sais pas pourquoi

    Peut-être que le programme était trop long mais une sécurité interne au bootloader de l'imprimante a empêché son écrasement (et donc génère une erreur à la relecture)

    => mais pourquoi mon firmware à priori trop long a bien fonctionné la première fois ???

    Mystère...
    Quand deux personnes échangent un euro, chacun repart avec un euro.
    Quand deux personnes échangent une idée, chacun repart avec deux idées.

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo