LUFA mass storage question ?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guys,

 

I tried doing experiment with LUFA with mass storage example, but I got this message:

Error    1    section .apitable_trampolines loaded at [00007fa0,00007fc5] overlaps section .data loaded at [00007e3e,00007fbd]        1    1    LuyFA_MS_32KB_4KB_1

 

I use Arduino Leonardo board for it..

 

What's wrong with it ?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do a web search on "LUFA apitable_trampolines". 

I believe it has something to do with the program too large for the flash memory.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got this :

http://www.fourwalledcubicle.com/files/LUFA/Doc/140928/html/_page__build_troubleshooting.html

 

My chip is atmega32U4, and I'm trying Lufa example

and I read from bootloadermassstorage.txt

 

\section Sec_Compat Demo Compatibility:
 *
 *  The following list indicates what microcontrollers are compatible with this demo.
 *
 *  \li Series 7 USB AVRs (AT90USBxxx7)
 *  \li Series 6 USB AVRs (AT90USBxxx6)
 *  \li Series 4 USB AVRs (ATMEGAxxU4) - <i>See \ref SSec_Aux_Space</i>
 *  \li ATMEGA32U2 - <i>See \ref SSec_Aux_Space</i>

 

How can I play with SSec_Aux_Space ? thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

another clue :

Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit  *  into 6KB of bootloader space. If you wish to alter this size and/or change the AVR model, you will need to  *  edit the MCU, FLASH_SIZE_KB and BOOT_SECTION_SIZE_KB values in the accompanying makefile.

 

Where is "makefile" in atmel studio ?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bianchi77 wrote:

Where is "makefile" in atmel studio ?

 

Somewhere in the Project section.

Look in the upper right hand frame of the atmel studio ide.

 

Last Edited: Tue. Jun 28, 2016 - 10:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How are you using LUFA in Studio?

 

If you downloaded the separate LUFA build tree then I would use the Makefile's that it already contains and in any AS7 project just use the "Use external Makefile" option. Don't be tempted to try and get AS7 to create projects that auto-generate Makefiles that "know" how to build LUFA - you will never succeed.

 

If, however you have added the "LUFA" extension to AS7 from the extension gallery then, like ASF, it uses a "Wizard" to create LUFA projects and it does know all the intricate detail of how to auto-generate Makefiles that will build LUFA. But in this case you should never be concerned with anything at the actual Makefile level. If you have read something that says "you need to do this .... in the Makefile" then you have to take "..." and do whatever it suggests in the configuration options of the Project you are building - which will then have a knock on effect into the auto-generated Makefiles.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I've been trying to run makefile manually, but now, my Leonardo unwriteable....I guess I corrupt the flash, I didn't change anything....but it happens..

How can I fix this atmega32U4....or no other way instead of unsoldering it ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
C:\Users\antonius>avrdude -p m32u4 -c usbasp -e -U  flash:w:Clock_DS1307_V1_0.hex -F

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATmega32U4 is 1E 95 87

avrdude done.  Thank you.


C:\Users\antonius>avrdude -p m32u4 -c usbasp

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got it fixed, with external clock 1MHz and change the fuse to external crystal....anyway what's the fuse setting for leonardo originally ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you dont load the bootloader, you get the 8k to use for lufa?

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oo, another fuse trouble again....now I can't talk to atmega32U4....any clues ? any possibilities using JTAG/paralell programming with another atmega board ?

two options in my mind...unsoldered change to another atmega32u4 or JTAG/paralel programming, which I don't have the ability...

Last Edited: Tue. Jun 28, 2016 - 09:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
avrdude -p m32u4 -c usbasp -F -v -U lfuse:w:0x10

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         AVR Part                      : ATmega32U4
         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       1024    8      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  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 : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATmega32U4 is 1E 95 87

avrdude done.  Thank you.

I put 1MHz to X1 and still saying nothing.....

Any other ways on overidding fuse ?

Or only unsolder it and change....that's what I can think of, before I'm wasting my time...

takes me few minutes to unsolder and put new atmega32u4...and I can play again....