i am trying to run a source code of win avr . after making the makefile when i try to send it using avrdude it is giving me error.
Please any one can help me
See the avrdude homepage for more information http://savannah.nongnu.org/projects/avrdude/
Check that you are setting the correct part no, port and programmer when calling avrdude, eg:
avrdude -p m8 -c stk200 -P lpt1 ...etc
If you're using MFile to generate the Makefile, then these should be set for you. Open the generated Makefile using your editor and check the values of
MCU
AVRDUDE_PROGRAMMER
AVRDUDE_PORT
Make sure they correspond to your microcontroller and programmer.
In the absence of better information on the actual error, here's a list of things to check when programming microcontrollers:
Is the power supply correct?
Is the oscillator running?
Is reset correctly configured?
Do you have proper bypass capacitors on the power pins of the target chip?
Are the programming wires correctly connected?
Are there any electrical conflicts on the programming lines?
Is the avrdude powering it, or is the project self powered?
What's the voltage at the pins on the microcontroller? Is it correct?
What's the overall circuit current draw? If it's high or low, look for shorts and opens.
Did you specify an erase command before a program command?
Does the mass erase or blank command work?
Can you see the programmer on the serial/usb/etc port?
Have you swapped out the target chip?
-Adam
Related
I have an OpenWRT system (Intel) where I have to control some GPIOS (it87). I would like to update from the classic sysfs approach (which works fine, but is being deprecated) to the new chardev, using libgpiod.
However, when I use the gpiod-tools (gpioget for instance), after a while using it, random files with random names (but all of them look like output console sentences) starts to create on / directory. Let me show you an example (this is after 1 hour uptime, only blue folders should be there)
This happens with OpenWRT 21 & 22, and with kernel 5.4 & 5.10.154. I really don't know why it is happening.
I tried tweaking some kernel paremeters regarding GPIO, my current cfg is as follows:
I tried also enabling both (sysfs & chardev), no luck.
What I'm missing? Could be something in other kernel cfg section?
Thank you! Any help would be really appreciated!
I don't understand below configuration in the configuration file in the u-boot.
CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x20000000"
It seems like setting DRAM size in the u-boot code.
But, I can't find the code which uses this configuration.
If you know this configuration how to work, please let me know.
The little history about the configuration, earlier board.cfg is used prior to kconfig.
boards.cfg was the main database that contained ARCH, CPU, etc. This is moved to kconfig in that options field of boards.cfg was converted as
Options -> CONFIG_SYS_EXTRA_OPTIONS defined by Kconfig
CONFIG_SYS_EXTRA_OPTIONS is defined as an extra option, also this can be set using CONFIG_SYS_SDRAM_SIZE as well.
After building the uboot go to the build dir and the corresponding board dir and you can simply grep for the string and you can see the sdram size.
From the README.kconfig
The option field of boards.cfg, which was used for the pre-Kconfig configuration, moved to CONFIG_SYS_EXTRA_OPTIONS verbatim now. Board
maintainers are expected to implement proper Kconfig options and
switch over to them. Eventually CONFIG_SYS_EXTRA_OPTIONS will go
away. CONFIG_SYS_EXTRA_OPTIONS should not be used for new boards.
I've been developing an embedded project for NXP LPC1774 Arm CortexM3 MCU.For the same project, I have coded many different versions and all worked fine. Today I added two new pin definitions where I choose them to be output pins for GPIO ports with the following line:
LPC_GPIO4->DIR |= 0x2000;
after this, I started to get the error #134 in every single line where I call a DIR register. I realized some header calls refer to another copy of the same file and I changed it. It did not help. Does anyone have an idea where this error could come from?
I finally solved the problem.
In my definitions file, I had a definition for motor direction and named it as DIR. It confused the compiler due to double definition.
To be more specific, I am looking for an equivalent to the Windows API function: WriteConsoleOutputCharacter. I know this style of direct output is possible, as I have seen the behaviour used before in the time that I have used Linux. However, I am still a baby when it comes to Linux specific C libraries, and have not been able to ascertain any clues as to where I may find such functionality. Any assistance would be appreciated.
Check out ncurses library.
It allows you to create some text-based UI in terminal. It is more than you asked, but if you need more than only this one function it may be best option for you.
You can use the ANSI control sequence
Say, following will print 'ddd' string 3 lines above the prompt in bash
echo -e "\e[3Addd"
This line will put a clock in right upper conner of a terminal (from commandlinefu.com)
while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done
I am trying to test the VHDL AVR8 soft processor found on Gadget Factory on a Digilent Nexys II (Spartan 3E) Development board. The project includes a Makefile for compiling a C (or other) software program and merging it with the FPGA bitstream so there is no need to resynthesize the HDL with every iteration of the software.
When I execute 'make' I get the following error associated with data2mem:
Merging Verilog Mem file with Xilinx bitstream: main.bit
data2mem -bm bin/top_avr_core_v8_bd.bmm -bt bin/top_avr_core_v8.bit -bd main.mem -o b main.bit
process_begin: CreateProcess(NULL, data2mem -bm bin/top_avr_core_v8_bd.bmm -bt bin/top_avr_core_v8.bit -bd main.mem -o b main.bit, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [main.bit] Error 2
I am executing 'make' in the same directory containing the VHDL project files, and I even have a blank 'main.bit' file in the directory.
Does anyone have any ideas about what's going on here? Does my blank 'main.bit' file need to be formatted a certain way or placed in a different location?
The following is a link to my Makefile:
Makefile
Other information to note: I'm new to using Makefiles in general, let alone for the specific purpose of merging software with an FPGA bitstream file. Also, I am attempting this on a Windows 7 machine in command prompt.
Thanks in advance.
Edit: Here's a link to the AVR8 soft processor on Gadget Factory, and here's the AVR8 source.
Offhand I'd say make cannot invoke the data2mem program. Do you have such a program on your system? Is the directory containing it in your PATH variable? Does it run properly? For example, can you type in that command line yourself at the command prompt and have it work properly?
When you say a "blank" main.bit, I assume you mean a "fully populated except for the memory that I want to put the program into" main.bit... otherwise nothings going to work!
It sounds like you do not have data2mem on your path - are you sure you are running your makefile from a command window/shell which includes the xilinx paths?
On Windows, there is a specific icon for this. Alternatively you can open any old command prompt and run the settings32.bat (or settings64.bat) file from within the Xilinx install folder to get set up. Or on linux, you can source the appropriate .sh/.csh file in your shell.