C/VHDL - Is there a way to generate .bit files - c

I have an FPGA which I would like to be able to configure from a C program, without having to use Xilinx ISE Design Tools. Is there a way for me to generate a .bit file from a set of VHDL modules that have been previously created?
For Example:
Entity 1 has an input a and an output b
I want to be able to use C to connect the I/O to different entities and then generate the .bit file and upload it to the FPGA.

Related

ESC/POS commands for printer module

I am trying to parse some commands to a printer module. it is extracted from a POS machine and I have driven that using Arduino as my CPU to pass image's HEX data to it. now I want to print text. I have found out that there is a universal command set called ESC/POS. but it seems like these commands are already installed on the commercial POS machines available in the market but not on the printer modules themselves. the module that I am using is this
can anyone tell me how to install ESC/POS commands for my setup? here you can see the block diagram of my setup:
As with the previous question, the search results you have shown are only the mechanical units of the printer, no control units there.
Normally, a printer has a control unit that interprets the commands received and performs printing.
If you want to connect the Arduino directly to the mechanical unit of the printer, you have to implement all the functions included in the control unit with the Arduino.
It is a system specific to the mechanical unit used, and there will be no universal and free software.
In other words, it is necessary to create all the interpretation and implementation of ESC/POS commands and the control of the mechanical unit by scratch.
If that is what you want to do, do your best.
Here's an article that does something similar to you. It doesn't seem to be resolved.
Print problem
This article includes the data sheet of the mechanical unit used by the questioner.
LTPZ245-B_J.pdf
If you really want to use this topology, this datasheet will be useful.
SII Thermal Printer Product Catalog 2018-2019
Usually, use the control board(IFD501-01UK/IFD501-01SK) as shown on page 5 of this catalog.
If this is the case, contact SII and we will provide you with a printer driver for Linux.
I don't know if it can be used with Arduino.
Or, even without a device driver, a serial port control board(IFD501-01SK) would make it easy to connect and communicate with the Arduino.

How can I create a bootable dvd with custom DOS boot script?

We have a bootable USB stick that works perfectly. It will boot, ask the user for some options, then write files to the hard drive accordingly. We did this by using rufus-2.1, throwing freedos into the USB stick, and basically hijacking autoexec.bat. Autoexec.bat now executes some separate .bat scripts based on user input.
The problem is, we now want to have an option to allow users to burn an iso to a cd or dvd. We've been trying to create an image of the USB stick and burn it to a DVD.
We found plenty of information on this subject, but nothing has worked. We started by extracting the bootimage from various bootable iso files using imgburn. None of these worked. We tried extracting the bootimage from our USB stick, and that also didn't work.
Next we tried WinImage. We extracted the boot information from boot98.exe, hijacked autoexec.exe, created a new image and injected the files. We saved the files as a bootimage and tried the above method again, which also didn't work.
Is there perhaps a more straightforward way to execute DOS .bat scripts through cd/dvd boot? We'd be open to something other than DOS as well, as long as it can write files to a hard drive based on user input through a simple boot interface.
Note: The computer itself does not contain an operating system.
Thanks.
We found a very slick setup that does what we need. Unfortunately, the CD-ROM drivers do not work properly on modern DVD drives. Using this method, it should be possible to put all the scripts directly in autoexec.bat and run commands directly on the "simulated" floppy drive. For whatever reason, we can boot from the "floppy" section of the CD-ROM, but it cannot copy files from A: to C:. I believe we are very close, but no cigar.
http://www.hiren.info/pages/bootablecd
First method that actually produced a bootable CD and allowed scripts to be run by a choice entered by the user.

16*2 LCD interfacing with Beagleboard xM using kernel module

I am trying to interface a 16x2 LCD with Beagleboard xM using GPIO. I have done this by using a shell script and it's working very good. Now I want to achieve the same functionality by writing a kernel module. I know little bit about kernel programming as I'm in the learning phase. Need some guidance. Thanks in advance!
Writing a kernel module is different then shell scripting. You must write your own code in C++, declaring the kernel mode, and then compile it. I found one example, but don't have time to check it, so I am leaving that to you.
Here is one example of writing kernel modules, and here is one tutorial for interfacing 16x02 lcd.
If you have a script you can load it like a module in linux ,
In /etc/rcS.d folder you will find a lot of scripts like S13-some_name.sh . These scripts will be automatically run by the kernel while booting up. So you can just add your scipt here to make it as a module
So one thing have to do is find the last number used in these list of scripts and rename your driver script by prepending the next number to the last in the list
for eg:
if the last script in /etc/rcS.d is S53logger.sh
Rename your scipt as S54-name-.sh (don't forget to change attributes by chmod +x)
If the /etc/rcS.d is not present there might be a file rc.local file you just add the driver script to it

cross platform reference to specific drive/directory

Is there a way to express a specific drive in both windows/linux? Windows usually uses"D:\etc" and Ubuntu/etc uses something like "/media/user/drive_name". Is there a awy to just refer to something like "/dev/sdc1" which both Windows and Ubuntu will recognize as the same drive?
I am trying to put this in a config file for a python program which can be run on an external data drive from an internal drive containing multiple OSs. The program has to refer to a separate external data drive, but I would like the program to work the same way for all of the OSs.
Is this possible?
Either you just need to account for your OS type in each machines properties file or test for the OS in the code and act accordingly.
import os
if os.name == "windows"
path = "D:/windows/path"
elif
path = "/unix/path"

Is there an established way to use configuration files for a deployed MATLAB application?

I am working with a MATLAB project, and would like to be able to configure variables and paths without re-creating the executable (currently done by using MATLAB's built-in deploytool). I realize I can create a simple text file, listing key=value pairs, and read that in during run-time. There doesn't seem to be any built-in support in MATLAB for creating configuration files that follow a standard format.
Are there any standard existing ways to use configuration files for MATLAB-generated executables?
1) Add your resource to the package in DeployTool in the shared resources part
2) Read by using:
fullfile(ctfroot(),'config.txt');
Edit : That is suitable if your configuration is "private", that is the user should not edit it. In this case it is deployed together with your program as a resource. If you want a "public" config for the users, I know of no better way than to do what you offered.

Resources