How do I setup wdb for Pre-Kernel debugging in vxworks 6.7? - c

I am new to the RTOS world and working on the eval version of vxworks 6.7. I don't know How to turn on the wdb debugging for my bootloader which has troubles loading my network driver. I hope someone can help me with a quick tips.
Thank you

Are you connected via serial for debugging? If not, it may be impossible to debug networking issues. wdb runs on host in eclipse and connects to device (target) via serial or ethernet.
Anyway you turn on wdb support via the project when you build the bootloader.

Related

Socketcan Driver implementation

I am new to creating a driver implementing.
My Application is using socketcan interface and apparently socketcan is not supported by the SOC.
I am planning to write my own driver. The issue I know how simple module for kernel I am not pretty sure where to start for socketcan driver .
If someone can please tell me where can I take reference for building the CAN driver or some git repo where can I use it and any specifics while writing the driver
SocketCan is the name of a Linux subsystem. It can be enabled in the kernel config via CONFIG_CAN. In turn, this subsystem will make use of platform-specific drivers to control the SOC's CAN adapters (if any).
If Linux's CAN subsystem is not enabled, make sure to enable CONFIG_CAN. If it is enabled, and no "can" device show up, the best would likely be to contact the SOC vendor for further guidance / drivers / devicetree / ... In any case, writing a custom driver is probably not necessary here.

How to connect on Nucleo with GDB?

I am using arm-none-eabi toolchain to create binary file for Nucleo which I then flash to the Nucleo using the USB virtual storage device it provides.
I am compiling the program with -ggdb. But how could I possibly connect to the nucleo and execute breakpoints on it? I can't even imagine how could it work, but I'm complete beginner.
Can I connect? How?
Yes you can connect, at least from a Linux host. I never tried from Windows system. Use OpenOCD to open a debug port and connect gdb (used arm-none-eabi-gdb) to this port with "gdb extended-remote" command. I am using this method from Linux host PC to connect to a custom board based on STM32L4 series for debugging and collecting log messages. Nucleo boards are also using the same series of STM controller.
For what it's worth there's a free IDE call EMBlocks that I've used in the past. I think the new version is called EMBitz https://www.embitz.org/
I've used it to both flash the STM32 Nucleo boards as well as debug the flashed image file.
A quick search also turns up this website that seems to indicate you can use GDB with the stlink utility. https://openenergymonitor.org/emon/node/6189

Disabling Linux driver for Arduino issue

I'm writing a kernel module which will be kind of a driver for my Chinese Arduino.
At one moment I had to disable existing arduino driver and make sure that arduino is not determined by system. I did it with rmmod command. Unplugged and plugged in my arduino. But it still determined in /dev/ as ttyUSB0, same as it was before.
Does it mean that I have more drivers on my system which I don't know about? Or every hardware plugged in usb port will be determined as a file regardless of driver existence? 0_0
Also, of course I have an arduino ide installed on my machine. Maybe there is a built-in driver? If so, how can I disable it without removing ide?
Thank you for the answers.
Does it mean that I have more drivers on my system which I don't know
about?
Kernel may be configured to use a particular driver while user space still might change that.
The manual way: rmmod your driver, unplug Arduino, check system log with dmesg. Plug in Arduino, check dmesg again. Automated way: use usb-devices script from usbutils package (apt-get install usbutils) to list usb devices and the drivers associated with them.
After you find the associated driver, most likely ch341, rmmod it, or add to /etc/modprobe.d/blacklist to disable loading of this module permanently.

How to do this: embedded USB-Host communication with plugged USB-Device

I am currently practising with USB programming on an AT91SAM9G20-Evaluation Kit. I learned much about USB devices and USB device port drivers while "playing" with the ATMEL provided USB device port projects (CDC-driver, ..).
But now I'd like to write a small driver to controll a wireless stick
which I plugged into one of the boards USB-A Host Ports.
I read a lot on Stack Overflow, the OpenHCI specification and even found some libraries on the net, but I am not sure if it's a good way to implement my own stack without any "good" knowledge in USB Host Port programming.
Is there a small and easy way to control the wireless-stick at the boards USB Host port? (like using the USART-Interfaces?).
I am also keen to hear hints on how to implement RTUSB or libUSB in to the AT91.
You can download AT91LIB version 1.9 from atmel from this page
The usb host libraries are under at91lib/usb/host. They're not the complete package you need though since they're just the OHCI driver -- you still need a USB driver and class drivers to implement what you want.
You could try an RTOS with USB Host support like rt-usb32

How to write DD-WRT C app?

I want to write a small proxy as a user-level program for the DD-WRT environment.
The proxy will read/write between a USB HID device (Arduino) attached to the DD-WRT box and a specific web server. The USB device will use an AT-style code. The web server uses HTTP.
I'm new to the DD-WRT environment.
Pointers to useful sample apps, GIT repos, blog posts, etc would be appreciated. Anything about getting started writing a DD-WRT app.
Googling has not been successful.
More Googling and reading has led me to:
Apparently, OpenWRT packages can be loaded onto DD-WRT systems. "Note that you can install any OpenWRT package, using ipkg." -- from a DD-WRT page
An intro to writing an OpenWRT package.
http://www.dd-wrt.com/wiki/index.php/Development
If you want to write a kernel module for DD-WRT, this seems like a good start.
DD-WRT has packages for many useful things. Python and pyserial struck my attention.
It is trivially easy to write a HTTP server in python. It is equally easy to interface with a serial port in python.
Load kernel drivers for the USB serial emulator chip on your Arduino (mine has a FTDI chip). It will manifest itself as /dev/ttyUSB0 or something. Do everything else in python.

Resources