Uploading Sketch to Maple mini from Arduino 1.6.9 [SOLVED]

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
navintiwari08
Posts: 16
Joined: Sat Aug 22, 2015 3:54 pm

Uploading Sketch to Maple mini from Arduino 1.6.9 [SOLVED]

Post by navintiwari08 » Sun Jul 31, 2016 3:16 pm

Hello there!
I've one of those maple mini clones. I put this new boot loader "maple_mini_boot20.bin" using FTDI 232 interface. I then connected the maple via usb and tried uploading sketch from Arduino 1.6.9 IDE. It failed and gave errors as below..

Code: Select all

Sketch uses 12,284 bytes (9%) of program storage space. Maximum is 122,880 bytes.
Global variables use 2,560 bytes of dynamic memory.
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: No DFU capable USB device available
Then I put the board in Perpetual bootloader mode and then uploaded the sketch. It succeeded this time.
Now, my question is, do I have to put the board in Perpetual boot loader mode(requires pressing "reset" button, releasing and pressing "button" button) every time I want to upload a program? Is there no way to do it without touching those buttons every time?

Thanks!
Navin
Last edited by navintiwari08 on Sat Aug 13, 2016 1:33 pm, edited 1 time in total.

simonf
Posts: 180
Joined: Sun Jul 26, 2015 4:03 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by simonf » Sun Jul 31, 2016 3:26 pm

Is it a baite maple mini?
Which bootloader did you select in the IDE? Origonal or Maple Mini.
Did you select the com port in the IDE?
What device is showing in device manager?

navintiwari08
Posts: 16
Joined: Sat Aug 22, 2015 3:54 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by navintiwari08 » Mon Aug 01, 2016 5:50 am

Is it a baite maple mini?
Yes, its the baite maple mini clone. Bought it on aliexpress.com.
Which bootloader did you select in the IDE? Origonal or Maple Mini.
I selected bootloader 2.0 (20 kb RAM and 128 K flash). I selected the board as "maple mini"
Did you select the com port in the IDE?
Yes, the com port is selected as ttyACM0 (I'm using Ubuntu 14.04)
What device is showing in device manager?
I'm not using Windows. I'm using Ubuntu 14.04.

I'm able to upload the sketch only when the board is in perpetual boot loader mode.

simonf
Posts: 180
Joined: Sun Jul 26, 2015 4:03 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by simonf » Mon Aug 01, 2016 1:35 pm

OK so you upgraded the bootloader so it no longer has the original bootloader.

My Ubuntu box is headless so i may struggle to help you, but I will give it a try. I will see if I have a spare maple I can change the bootloader in.

As you are in linux to find out about the device unplug and replug your device. The run

dmesg | grep -i USB

Code: Select all

[228778.139821] usb 8-2: new full-speed USB device number 4 using uhci_hcd
[228778.309749] usb 8-2: New USB device found, idVendor=1eaf, idProduct=0004
[228778.309755] usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[228778.309758] usb 8-2: Product: Maple
[228778.309761] usb 8-2: Manufacturer: LeafLabs
[228778.425088] cdc_acm 8-2:1.0: ttyACM0: USB ACM device
[228778.427825] usbcore: registered new interface driver cdc_acm
[228778.427828] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters


It should show something as above that is for a Baite with original bootloader.

I suspect your device is working correctly as the IDE is giving you ttyACM0 as a com port option. I have no experience with the baite and bootloader 2.0 but if i get chance tonight i will reflash the bootloader on one of mine.

fredbox
Posts: 95
Joined: Tue Jul 07, 2015 4:44 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by fredbox » Mon Aug 01, 2016 2:40 pm

Bootloader 2.0 on Linux Mint 17.3

Code: Select all

[570092.988859] usb 1-1: new full-speed USB device number 81 using xhci_hcd
[570093.118193] usb 1-1: New USB device found, idVendor=1eaf, idProduct=0004
[570093.118208] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[570093.118211] usb 1-1: Product: Maple
[570093.118214] usb 1-1: Manufacturer: LeafLabs
[570093.118421] usb 1-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[570093.118974] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

navintiwari08
Posts: 16
Joined: Sat Aug 22, 2015 3:54 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by navintiwari08 » Mon Aug 01, 2016 4:46 pm

Here is what i got after dmesg | grep -i USB

Code: Select all

[  661.320040] usb 2-1: new full-speed USB device number 6 using ohci-pci
[  661.532296] usb 2-1: New USB device found, idVendor=1eaf, idProduct=0004
[  661.532304] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  661.532308] usb 2-1: Product: Maple
[  661.532312] usb 2-1: Manufacturer: LeafLabs
[  661.534408] cdc_acm 2-1:1.0: ttyACM0: USB ACM device

zmemw16
Posts: 1449
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by zmemw16 » Mon Aug 01, 2016 6:21 pm

try this; i have it in shell script called comms

Code: Select all

ls -lt /dev |egrep 'stlink|ttyACM|ttyUSB'
i'm curious about the permissions of the tty* devices

srp

navintiwari08
Posts: 16
Joined: Sat Aug 22, 2015 3:54 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by navintiwari08 » Tue Aug 02, 2016 4:39 am

I'll post the result of

Code: Select all

ls -lt /dev |egrep 'stlink|ttyACM|ttyUSB'
as soon as I get home.

I would however like to point it out that there is nothing wrong with tty port. I just want to know if I have to put the maple mini in perpetual boot loader mode every time I upload the code? Because, right now that is how its working.
Can't I just hit "upload" button in the Arduino IDE and burn the code? I hope the question is clear. I'm confused how the tty port permissions are relevant here? Please guide me. I'm a newbie to this.
Thanks!

zmemw16
Posts: 1449
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by zmemw16 » Tue Aug 02, 2016 9:19 am

that button pressing does get annoying, worse with fat fingers :)

permissions, if wrong cause the process to stop. that's fine, but if incorrect mister blaster can kill anything.

Code: Select all

crwxrwxrwx  1 stephen dialout   166,   0 Aug  2 09:04 ttyACM0
lrwxrwxrwx  1 root    root             7 Aug  2 09:04 maple -> ttyACM0
lrwxrwxrwx  1 root    root            15 Aug  2 09:04 stlinkv2_7 -> bus/usb/001/008
first everything is a file. whether a hard link, soft link, device, dir; everything

first line user stephen is in group dialout, that allows me(stephen) and if i'm a member of group dialout access

lrwxrwxrwx is for files: file type is l link(if c char dev, if d dir, next, is a number i- how many are linked to it,
permissions rwx for user, rwx for world and for group rwx. the 166 is ???

Code: Select all

-rwxr-xr-x   1 stephen stephen        47 Jun 11  2015 umount_1TB1*
this is more typical everyone can read it and execute it, only stephen can overwrite it
one gotcha is a directory needs to be +x just to be seen by owner.

typically broken into 3 bit blocks from the right and written in octal as 755, that first bit is a bit loopy, read chmod and chown man pages.

do a search for linux file permissions, should give you plenty :D
above all of this is user root, basically that owner can plough through your file system with a typo, an extra space!
if in your home dir, sudo rm -rf ./. * will quite happily empty it, including the ./.config files you meant

srp

navintiwari08
Posts: 16
Joined: Sat Aug 22, 2015 3:54 pm

Re: Uploading Sketch to Maple mini from Arduino 1.6.9

Post by navintiwari08 » Wed Aug 03, 2016 5:47 pm

Hey..
I did this:

Code: Select all

ls -lt /dev |egrep 'stlink|ttyACM|ttyUSB'
and got this:

Code: Select all

crw-rw-r--  1 root dialout 166,   0 Aug  3 23:10 ttyACM0
lrwxrwxrwx  1 root root            7 Aug  3 23:09 maple -> ttyACM0
I'm not sure if this conveys something relevant. Please do let me know.
Thanks!

Post Reply