Issues with embedded Rust semihosting on windows - windows

I'm a low-level dev in training, trying to get into embedded Rust.
I found this great video on how to get started without hardware, and I jumped on it. I got qemu up and running, and my program builds perfectly, but when I try to run it, I get this error:
Timer with period zero, disabling
error: process didn't exit successfully: qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel target\thumbv7m-none-eabi\debug\embeddedtest (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
I'm quite confused and didn't see this anywhere else, so I hope you can help me out

Related

Freedos installation on Qemu fails with "unable to locate the installation packages"

Trying to install Freedos (v1.2) in Qemu - and it fails always with the same error: Unable to locate the installation packages..
On the web there are versions of the same guide on how to do this: https://opensource.com/article/17/10/run-dos-applications-linux
I can create the image for the hard drive, then run qemu:
qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw sb16,adlib -device cirrus-vga -cdrom FD12FULL/FD12FULL.img -hda freedos.img -boot order=d
The installation process starts successfully, it finds the hard drive images, then it formats it and mark as primary. Then I can select the language and start the installation - on the next screen it shows a dialogue to gather information about the machine - and the next screen is the failure:
I've tried the following options when starting qemu:
for cdrom using the "standard" / "legacy" / "full" / "lite" Freedos installation CD images
using both these 4 CD images with and without the official Freedos installation Floppy
booting from CD and booting from Floppy
attaching the CD img as img or as mounted drive
If I select No - Return to DOS I always see 3 drives: (A:) having the CD image, (B:) floppy image, (C:) the empty attached drive image and a (D:) drive which is not readable.
Looked at a few findings in google (case 1, case 2) but didn't really helped much.
seems to be a bug in seabios regarding support of ATA CDROMs, see https://patchwork.kernel.org/patch/10857581/ and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934134
In case anyone else is looking for an answer. The problem was due to a version of seabios that has a CD driver bug. If you download the latest version and compile it. You should be able to provide the "-bios <your_newer_compiled_seabios>" to the qemu command line to get around this problem.
What I did was follow these steps:
# Get a newer version of the seabios:
$ git clone https://git.seabios.org/seabios.git
# Change directory and compile it
$ cd seabios
$ make
...
Total size: 185536 Fixed: 87584 Free: 76608 (used 70.8% of 256KiB rom)
Creating out/bios.bin
Then I used the out/bios.bin bios in your qemu command line to load it:
$ <your-qemu-command-line> -bios out/bios.bin <any other command options>
Hope that helps other folks running into the same problem.

Non-zero return code '255' from command - Tensorflow Audio Recognition

Trying to get the "continuous stream of audio" for this thing to run (You can find it under the part of "Streaming Accuracy"): https://www.tensorflow.org/versions/master/tutorials/audio_recognition
However, when I do so by using the suggested command: (Yes I do have a long audio file that is documented with the words appearing at the right time as they require for this part, saved in the right folder)
bazel run tensorflow/examples/speech_commands:test_streaming_accuracy -- \
--graph=/tmp/my_frozen_graph.pb \
--labels=/tmp/speech_commands_train/conv_labels.txt \
--wav=/tmp/speech_commands_train/streaming_test.wav \
--ground_truth=/tmp/speech_commands_train/streaming_test_labels.txt \
--verbose
I get the following error:
ERROR: Non-zero return code '255' from command: Process exited with status 255
I tried google, but that didn't make me much wiser...
System specs:
Macbook Pro - late 2011
High Sierra 10.13.4
Bazel Version: 0.13.0-homebrew
Anyone knows how to tackle this problem, or has had a similar issue that they solved?

Building parallel hdf5 with cygwin

I recently attempted to install parallel hdf5-1.10.1 from source with cygwin 2.8.2 and stumbled into a "SIG_SETMASK undeclared" error during make. I wanted to use h5py to write hdf files in parallel (in windows environment).
I tried to follow the instructions from https://support.hdfgroup.org/ftp/HDF5/current/src/unpacked/release_docs/INSTALL_parallel
First I ran the c version of the Sample_mpio.c and it seems it worked:
Proc 2: all tests passed
Proc 3: all tests passed
Proc 1: all tests passed
Proc 0: all tests passed
So, the first step was configure:
CC=mpicc ./configure --enable-parallel --enable-shared
and then make
However, at some point make exited with several SIG_SETMASK undeclared error messages pointing to sigsetjmp(J,N) of the #define HDsigsetjmp(J,N) sigsetjmp(J,N) part followed by in expansion of macro ... for several macros.
Since there are no separate building instructions for cygwin, like for the serial case, I thought it might be an issue of cygwin.
What is the proper way to install parallel hdf5 (and h5py) on windows?
Edit 1:
Thanks to #varro 's suggestion, setting make CFLAGS=-D_POSIX_C_SOURCE resolved the error.
Nevertheless, now make check gives a segmentation fault...
Testing testhdf5.exe
/bin/sh: line 30: 22284 Segmentation fault (core dumped) srcdir="." ./${tname} >> ${log} 2>&1

Error with the command 'make basics ' while install winexe

I want to isntall winexe on Ubuntu 13.1 32bit version.
I did exactly after this guide: Winexe - aldeid
If I execute the command "make basics bin/winexe" there occurs the following error:
Compiling ../librpc/idl/atsvc.idl
/usr/include/stdc-predef.h:0: error: Syntax error near '3'
Failed to parse ../librpc/idl/atsvc.idl at ./../pidl/pidl line 608.
make: *** [idl] Error 1
I have absolutely no idea how to fix this.
I would be even satisfied with a solution suggestion to this problem.
Thank you.
make "CPP=gcc -E -ffreestanding" basics bin/winexe works around this error.
I found "another" way to isntall winexe.
ubuntu forum
The Donwload-Links to the static version (just unzip and run winexe) are working at the moment (on some other pages they didn't).
I still don't know why the error above occurs, if anybody knows it, please tell me anyway. I am still interessted.
VERY IMPORTANT EDIT: After restart winexe gives put an Internal Error signal 11
So I still need a solution for winexe. Either to isntall the verision from git or to fix this error.
EDIT nummber 2: OK, why am I sking questions if I answer them by myself?
The installation form the quide mentiond in my question qorks fine on Ubuntu 12 LTS and winexe-static-version is also ok if you don't make typing errors as I did.

Ocropus 4.4. crashes on Xubuntu 10.4

I have problems with Ocropus 4.4. (open source OCR). I installed Ocropus and neccessary libries following this script. Compilation/Installation goes without any problem.
However after successful installation of ocropus, I am not able to run any of ocropus-* commands. Ocropus-page and ocropus-hocr crash without giving any error meaningful message. I just get a cryptic killed after 2 minutes of processing.
ocropus-pages page_001.jpeg
[note] line recognizer: >
[note] *** 1 page_001.jpeg ***
Killed
I do not know where to start to fix it. Has anybody an idea where to start?
My machine is XUbuntu 10.4 64bits (run in VirtualBox) with 512MB of base memory.
I would try to convert your images to uncrompressed tiff before processing. I know that ocropus is working closely with tesseract and that tesseract handles 1bpp uncompressed tiffs the best.
Despite this being an old question I thought I'd post a solution / some debug tips as I experienced the same problem under the same scenario. The scenario being: Debian running under VirtualBox with 512MB RAM
In order to debug "Killed" messages you should look into /var/log for help. In my case kern.log contained:
debian kernel: [89675.791910] Out of memory: Kill process 13004
(ocropus-rtrain) score 806 or sacrifice child
debian kernel: [89675.791951] Killed process 13004 (ocropus-rtrain)
total-vm:800816kB, anon-rss:412424kB, file-rss:4kB
It's likely you need to increase the amount of resources assigned to the VM particularly if you're running some big fancy window manager in the background!

Resources