Ameba8195 / Arduino

This is Arduino SDK for Ameba Arduino board.
86 stars 52 forks source link

ERR: Cannot access mbed driver! #2

Open shmrymbd opened 7 years ago

shmrymbd commented 7 years ago

Hi i am using macos. having problem to upload

brainstorm commented 7 years ago

The CH340 USB-to-serial chip access support is not implemented yet since, apparently, the upload is too slow, see issue #1.

If you feel adventurous, you could try plugging in an SWD-capable gear such as the J-Link Segger and have OpenOCD program it, as I did myself in here:

https://bitbucket.org/rebane/rtl8710_openocd/pull-requests/1/add-support-for-osx-with-preinstalled/diff

Since it's also under development (the firmware crashes for me since I still have to tweak the memory layout/flashing), I cannot help you much there either. I hope @Ameba8195 implements the UART support anyway, even if it's too slow, to give easy access to the rtl8710 to the general public.

Btw, how slow is to upload i.e 1MB of ram_all.bin into the RTL8710 via CH340, @Ameba8195? Did you try it out at all?

shmrymbd commented 7 years ago

hi i'm just stuck with arduino ide .. the error ERR: Cannot access mbed driver!

brainstorm commented 7 years ago

@Ameba8195: For instance, the ESP8266 can be programmed really fast only via UART:

https://blog.cesanta.com/esp8266-superfast-flashing-flash-esp-in-5-seconds

@shmrymbd, yes, I know since I've been there too (mbed driver error). You should just wait until all this is supported and update then, sorry, come back later on ;)

andrews05 commented 7 years ago

@Ameba8195, any update on this? The Getting Started guide says macOS is supported, but there aren't any instructions for how to make it work.

maticzav commented 7 years ago

Any progress with this?

treii28 commented 7 years ago

any progress on this? (using ubuntu linux)

astro commented 7 years ago

Any progress?

kissste commented 6 years ago

+1 got the same error

robertoostenveld commented 6 years ago

+1 got the same error

ricardoper commented 5 years ago

Ubuntu 18.04 - Arduino 1.8.8 - Same error...

Any alternative to make it working from Ubuntu or any Linux OS?

kissste commented 5 years ago

Ubuntu 18.04 - Arduino 1.8.8 - Same error...

Any alternative to make it working from Ubuntu or any Linux OS?

This is the only solution that I am aware of: https://github.com/Ameba8195/Arduino/issues/2#issuecomment-257833909

temach commented 5 years ago

Here is the solution that worked for me on linux.

The mbed/ameba approach means the microcontroller appears as a flash drive in the os. The arduino after compiling and transforming the binary copies the binary to this flash drive. The commands it uses can be found at the bottom of platform.txt which on my system is at ~/.arduino15/packages/RAK/hardware/ameba/2.0.2/platform.txt

Looking into that file I see this line: tools.ameba_tools.upload.pattern.linux="{runtime.tools.ameba_tools.path}/upload_dap_linux" "{runtime.tools.ameba_tools.path}/ram_all.bin"{upload.verbose}

So it uses the program "upload_dap_linux", this program is located in: ~/.arduino15/packages/RAK/tools/ameba_tools/1.0.9/upload_dap_linux But the most important part is that its source is located nearby: ~/.arduino15/packages/RAK/tools/ameba_tools/1.0.9/tools/linux/src/upload_dap_linux.cpp (also availiable here: https://github.com/RAKWireless/CREATOR-Arduino-SDK/blob/master/ameba_tools_linux/tools/linux/src/upload_dap_linux.cpp )

This source contains the actual error message: "Cannot access mbed driver!" Looks like the program expects the mbed/ameba usb drive to be mounted at an unusual location (for mac or linux), and if it does not find it - it quits with error.

The path as seen from the source code (on linux) is: /media/$USER/MBED/

So to make arduino work for me I had to mount the fake flash drive (it was /dev/sdc) at this path. Then I run arduino as root because it takes root privileges to copy your program binary ( called ram_all.bin) to that fake drive.

Arduino reported that programming was completed successfully.

miterfrants commented 2 years ago

rename your /Volumes/DAPLINK to /Volumes/MBED @shmrymbd