Arduino IDE can not start.

OK:

nvidia@tegra-ubuntu:/usr/bin$ lsmod
Module Size Used by
fuse 89008 5
bcmdhd 7625819 0
pci_tegra 74691 0
bluedroid_pm 13564 0
nvidia@tegra-ubuntu:/usr/bin$

nvidia@tegra-ubuntu:/usr/bin$ gunzip < /proc/config.gz | grep ‘CONFIG_USB_ACM’

CONFIG_USB_ACM is not set

Seem something is missing… shall I have to compile a kernel ???
PANIC!

tell me… thanks!

If CONFIG_USB_ACM is the required feature for this particular hardware, then yes (though compiling a module and not a whole kernel might do the job). The information from @Kangalow tends to validate the need for this feature.

“Compiling a module” …
Too much for me.
Is there any guide?

Generally speaking this produces a file you can copy to the system in the right place.

You start with the kernel source, set its configuration to the same as your running system, run a program to edit the configuration to change to the configuration you want, and run the “make” command. You end up with the file. Keep in mind this is a developer embedded board and not a desktop system, so some steps which are automated or included by default for a desktop PC don’t exist.

If you do this once it isn’t too difficult, you may need some patience to get to that point if you are new to Linux or building kernels since this is an embedded system and most of the time (not always) you will build the file on your host PC (cross compiling) instead of directly on the Jetson (native compiling).

The short answer (which is the higher learning curve) is that the L4T R28.1 downloads area has a “Documentation” download, and within this is a kernel customization section telling about this.

There are also some other guides out there. In each case be aware that on R28.1 some instructions changed, so if you look at old information most of the build and compile is the same, but some details might differ.

As of R28.1 both the Jetson TX1 and TX2 use the same sample rootfs, so you may see information for both listed in the same place. Some details may differ (mostly on installing updates, much less difference in actual kernel builds).

Here is one place you can look:
[url]https://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X1_source_code[/url]
(note that JetPack 3.1 probably implies L4T version R28.1…mostly TX1 and TX2 info will be the same…any reference to a t21 or t210 is a reference to a TX1…any reference to a t18 or t186 or quill is a reference to a TX2)

This is a case of information specifically on the ttyACM module and is probably where you want to start:
[url]http://www.jetsonhacks.com/2017/08/07/build-kernel-ttyacm-module-nvidia-jetson-tx1/[/url]

A bit of knowledge which will save you some time: Initial configuration. Sometimes you will see mention of “make tegra21_defconfig”…this is a default initial configuration, but may not match your Jetson. A better step is to copy “/proc/config.gz” from your running system, use “gunzip” on the file to unzip it, and then copy it to name “.config” where you are building your kernel. Other than one detail this will almost get an exact starting match to your running kernel. Then your ACM edit can be the only change to get a working configuration.

I say “almost an exact starting match” because there is one detail the “/proc/config.gz” does not copy. Each Linux system responds with a version from the command “uname -r”. Kernel modules are looked for in “/lib/modules/$(uname -r)/”. The base kernel source code version determines the prefix of this, but in the “.config” file there is a “CONFIG_LOCALVERSION” you can edit and this will set the suffix of “uname -r”. So if your “uname -r” is “4.4.38-tegra” it means your kernel source code is “4.4.38” and that the CONFIG_LOCALVERSION was set to “-tegra” when the kernel was built, and thus modules are found in “/lib/modules/4.4.38-tegra/”.

Give that a shot and ask more questions when you run into something. Whichever system you build on you will probably want to install package “libncurses5-dev” (“sudo apt-get install libncurses5-dev”). This makes some of the editors available. An example is that within a kernel build “make menuconfig” or “make nconfig” offer different editors for changing a configuration item without directly editing the “.config” file…these require libncurses5-dev.

Thank you very much. (I was out for 2days, tomorrow I’ll work.)
So this will be my steps:

  1. Locate my kernel. (I remember that “uname -r” told “4.4.38-tegra”
  2. Edit the file I find in “/lib/modules/4.4.38-tegra/” enabling the ACM
  3. Compile
  4. Replace the original kernel with the one just compiled

Thank you

Ops

FYI, “sudo depmod -a” should set up any meta data files in “/lib/modules/$(uname -r)/” once the module is there. For ACM you should only need to copy this instead of the whole Image file provided you build it as a module.

thank you thank you very much my friends ! ACM appears!!!

and this is what I get now:

[ 15.926284] usb 1-2.4: new full-speed USB device number 5 using xhci-tegra
[ 16.023452] usb 1-2.4: New USB device found, idVendor=2341, idProduct=0043
[ 16.023456] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 16.023458] usb 1-2.4: Manufacturer: Arduino (www.arduino.cc)
[ 16.023460] usb 1-2.4: SerialNumber: 952373239343514081C2
[ 16.023661] usb 1-2.4: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 16.024102] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6
[ 16.024494] cdc_acm 1-2.4:1.0: ttyACM0: USB ACM device

So my arduino is connected to ttyACM0

There is still a little trouble: Arduino IDE doesn’t communicate

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding

this is anotherkinfd of problem… I’m going to study about. (If someone has any idea…)

gio

Serial devices need to be told to run with the same settings on both sides of the connection. As an example, the serial console runs speed 115200, 8 bits, no stop bits, and 1 parity bit. “115200 8N1”. In some cases software flow control is set (no flow control…this works great at lower speeds and smaller or shielded cable runs), or hardware flow control (the CTS/RTS hardware handshake).

So if your arduino is set to use a port setting different than what the current port is at, then you’ll get either noise or nothing at all. The pain of serial consoles is that they don’t have any way to query what they are really doing…you can query the driver, and hope the driver really knows what the hardware is set to. Try to find out what serial port settings are in effect.

Also, for modem communication programs, it is possible there are other commands layered on top of that.

You will probably want to check permissions, you’re trying to talk to a serial port.

Good catch…group “dialout” is often the owner of a serial device, and adding the user to this as a supplementary group would solve that part of the problem if it is a simple file permission problem.

Perfect! It works

The last things to do is in the IDE setup of Arduino, setting the Arduino one and the usb programmer

Thanks to everybody!

Can you tell me how do you fix the below problem? I am having the same issue.

nvidia@tegra-ubuntu:~$ arduino
Exception in thread "main" java.lang.ExceptionInInitializerError
	at processing.app.Preferences.save(Preferences.java:735)
	at processing.app.Preferences.init(Preferences.java:249)
	at processing.app.Base.main(Base.java:117)
Caused by: java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
	at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:236)
	at processing.core.PApplet.<clinit>(Unknown Source)
	... 3 more
nvidia@tegra-ubuntu:~$

That simply means it needs a GUI to run in (or at least the buffer the GPU is using).

If you have a running and logged in display you can set this on command line even from a text console in order to associate with that first display:

export DISPLAY=:0
...run whatever program here...

If you don’t have a physically attached monitor, then you’ll need to run a virtual desktop (virtual desktop servers are indistinguishable to end software versus a physically attached monitor).

I have no advice on specific virtual desktop software…someone else may have advice on that.

@linuxdev Thank you.It worked for me.

I am have a similar problem, but not managed to solve it. I am running with Tx2 with arduino 1.0.5. Arduino fails to launch with the follow errror code.

Exception in thread “main” java.lang.ExceptionInInitializerError
at processing.app.Preferences.setColor(Preferences.java:851)
at processing.app.Preferences.init(Preferences.java:273)
at processing.app.Base.main(Base.java:117)
Caused by: java.awt.HeadlessException
at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:236)
at processing.core.PApplet.(Unknown Source)
… 3 more

The problem doesnt resolve after running the export DISPLAY cmd. Anyone can help me with that? Many thanks for that. In addition, how should I do in order to run arduino with newer version. I have read the threads, but not managed to run it

Keep in mind that the “export” command requires the same user who uses the command to be logged in to the GUI at that time. Was your user logged in to the GUI?

I got the same issue as you. I just guess that the problem comes from Java. Thus, I completely removed java 8, re-install then install arduino again. It worked !