ESP32 cannot upload code write_flash error - arduino-ide

I'm getting this error on Arduino(1.8.9).
usage: esptool write_flash [-h] [--erase-all]
[--flash_freq {keep,40m,26m,20m,80m}]
[--flash_mode {keep,qio,qout,dio,dout}]
[--flash_size FLASH_SIZE]
[--spi-connection SPI_CONNECTION] [--no-progress]
[--verify] [--compress | --no-compress]
<address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address>
<filename>: [Errno 2] No such file or directory:'/home/USER/.arduino15/packages/esp32/hardware/esp32/1.0.2/tools/partitions/boot_app0.bin'
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: '/home/USER/.arduino15/packages/esp32/hardware/esp32/1.0.2/tools/partitions/boot_app0.bin'
Although boot_app0.bin file is present:
image link

To fix this problem you can try to edit the platform.txt file which you can find in your esp package directory.
So, you need to replace inner section with code written below:
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern={recipe.hooks.linking.prelink.1.pattern} & "{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}" & {recipe.objcopy.hex.1.pattern}
The key thing here is "{recipe.hooks.linking.prelink.1.pattern} &" at start and "& {recipe.objcopy.hex.1.pattern}" at the end. The text between is the part of the platform.txt file, that you dont need to change.
The above is true for OS Windows. In OS Linux set {recipe.hooks.linking.prelink.1.pattern} ;" and "; {recipe.objcopy.hex.1.pattern}".
Its solve my problem for ESP8266, I hope its will be helpful for you too.
Reference link https://www.eclipse.org/forums/index.php/t/1095090/

if you are using esptool. Make sure you actually download the files from github using the download button instead of using the save as option when u right click on the file name.

Related

Opensmile: unreadable csv file while extracting prosody features from wav file

I am extracting prosody features from an audio file while using Opensmile using Windows version of Opensmile. It runs successful and an output csv is generated. But when I open csv, it shows some rows that are not readable. I used this command to extract prosody feature:
SMILEXtract -C \opensmile-3.0-win-x64\config\prosody\prosodyShs.conf -I audio_sample_01.wav -O prosody_sample1.csv
And the output of csv looks like this:
[
Even I tried to use the sample wave file given in Example audio folder given in opensmile directory and the output is same (not readable). Can someone help me in identifying where the problem is actually? and how can I fix it?
You need to enable the csvSink component in the configuration file to make it work. The file config\prosody\prosodyShs.conf that you are using does not have this component defined and always writes binary output.
You can verify that it is the standart binary output in this way: omit the -O parameter from your command so it becomesSMILEXtract -C \opensmile-3.0-win-x64\config\prosody\prosodyShs.conf -I audio_sample_01.wav and execute it. You will get a output.htk file which is exactly the same as the prosody_sample1.csv.
How output csv? You can take a look at the example configuration in opensmile-3.0-win-x64\config\demo\demo1_energy.conf where a csvSink component is defined.
You can find more information in the official documentation:
Get started page of the openSMILE documentation
The section on configuration files
Documentation for cCsvSink
This is how I solved the issue. First I added the csvSink component to the list of the component instances. instance[csvSink].type = cCsvSink
Next I added the configuration parameters for this instance.
[csvSink:cCsvSink]
reader.dmLevel = energy
filename = \cm[outputfile(O){output.csv}:file name of the output CSV
file]
delimChar = ;
append = 0
timestamp = 1
number = 1
printHeader = 1
\{../shared/standard_data_output_lldonly.conf.inc}`
Now if you run this file it will throw you errors because reader.dmLevel = energy is dependent on waveframes. So the final changes would be:
[energy:cEnergy]
reader.dmLevel = waveframes
writer.dmLevel = energy
[int:cIntensity]
reader.dmLevel = waveframes
[framer:cFramer]
reader.dmLevel=wave
writer.dmLevel=waveframes
Further reference on how to configure opensmile configuration files can be found here

error finding and uploading a file in octave

I tried converting my .csv file to .dat format and tried to load the file into Octave. It throws an error:
unable to find file filename
I also tried to load the file in .csv format using the syntax
x = csvread(filename)
and it throws the error:
'filename' undefined near line 1 column 13.
I also tried loading the file by opening it on the editor and I tried loading it and now it shows me
warning: load: 'filepath' found by searching load path
error: load: unable to determine file format of 'Salary_Data.dat'.
How can I load my data?
>> load Salary_Data.dat
error: load: unable to find file Salary_Data.dat
>> Salary_Data
error: 'Salary_Data' undefined near line 1 column 1
>> Salary_Data
error: 'Salary_Data' undefined near line 1 column 1
>> Salary_Data
error: 'Salary_Data' undefined near line 1 column 1
>> x = csvread(Salary_Data)
error: 'Salary_Data' undefined near line 1 column 13
>> x = csvread(Salary_Data.csv)
error: 'Salary_Data' undefined near line 1 column 13
>> load Salary_Data.dat
warning: load: 'C:/Users/vaith/Desktop\Salary_Data.dat' found by searching load path
error: load: unable to determine file format of 'Salary_Data.dat'
>> load Salary_Data.csv
warning: load: 'C:/Users/vaith/Desktop\Salary_Data.csv' found by searching load path
error: load: unable to determine file format of 'Salary_Data.csv'
Salary_Data.csv
YearsExperience,Salary
1.1,39343.00
1.3,46205.00
1.5,37731.00
2.0,43525.00
2.2,39891.00
2.9,56642.00
3.0,60150.00
3.2,54445.00
3.2,64445.00
3.7,57189.00
3.9,63218.00
4.0,55794.00
4.0,56957.00
4.1,57081.00
4.5,61111.00
4.9,67938.00
5.1,66029.00
5.3,83088.00
5.9,81363.00
6.0,93940.00
6.8,91738.00
7.1,98273.00
7.9,101302.00
8.2,113812.00
8.7,109431.00
9.0,105582.00
9.5,116969.00
9.6,112635.00
10.3,122391.00
10.5,121872.00
Ok, you've stumbled through a whole pile of issues here.
It would help if you didn't give us error messages without the commands that produced them.
The first message means you were telling Octave to open something called filename and it couldn't find anything called filename. Did you define the variable filename? Your second command and the error message suggests you didn't.
Do you know what Octave's working directory is? Is it the same as where the file is located? From the response to your load commands, I'd guess not. The file is located at C:/Users/vaith/Desktop. Octave's working directory is probably somewhere else.
(Try the pwd command and see what it tells you. Use the file browser or the cd command to navigate to the same location as the file. help pwd and help cd commands would also provide useful information.)
The load command, used as a command (load file.txt) can take an input that is or isn't defined as a string. A function format (load('file.txt') or csvread('file.txt')) must be a string input, hence the quotes around file.txt. So all of your csvread input commands thought you were giving it variable names, not filenames.
Last, the fact that load couldn't read your data isn't overly surprising. Octave is trying to guess what kind of file it is and how to load it. I assume you tried help load to see what the different command options are? You can give it different options to help Octave figure it out. If it actually is a csv file though, and is all numbers not text, then csvread might still be your best option if you use it correctly. help csvread would be good information for you.
It looks from your data like you have a header line that is probably confusing the load command. For data that simply formatted, the csvread command can bring in the data. It will replace your header text with zeros.
So, first, navigate to the location of the file:
>> cd C:/Users/vaith/Desktop
then open the file:
>> mydata = csvread('Salary_Data.csv')
mydata =
0.00000 0.00000
1.10000 39343.00000
1.30000 46205.00000
1.50000 37731.00000
2.00000 43525.00000
...
If you plan to reuse the filename, you can assign it to a variable, then open the file:
>> myfile = 'Salary_Data.csv'
myfile = Salary_Data.csv
>> mydata = csvread(myfile)
mydata =
0.00000 0.00000
1.10000 39343.00000
1.30000 46205.00000
1.50000 37731.00000
2.00000 43525.00000
...
Notice how the filename is stored and used as a string with quotation marks, but the variable name is not. Also, csvread converted non-numeric header data to 'zeros'. The help for csvread and dlmread show you how to change it to something other than zero, or to skip a certain number of rows. If you want to preserve the text, you'll have to use some other input function.

When using "file mkdir" in TCL i get the error that the folder does not exist, but thats why i want to create it..

I am having a little trouble when creating a directory in TCL8.5.9 on a Windows 7 Computer.
set CurrentDir [ file dirname $GUI_DB_path]
set ImageFolderPath [ file join $CurrentDir "DeflectionPlots" ]
# Always try to delete the Folder no matter if it exists or not
file delete -force $ImageFolderPath
# sometimes the following throws an error. Do not understand why.
# Create a clean and empty ImageFolder
file mkdir $ImageFolderPath
Sometimes, but not always i get the error:
cant't create directory.....$ImageFolderPath..... No such file or Directory
Well, that is why I want to create it. Running the code a second time without any changes results in the creation of the Directory as desired. What causes this and how can i resolve the issue? I could catch the error, but then I still would not have my Folder created.
Windows file operations (or their internal locking) is often slow.
I run into problems like yours where deletions/new files/renames take
a while and then I get errors because the file(s) are in some sort of
operating system limbo.
You can add a short sleep between the delete and the create and that
should resolve the issue on Windows.
set ::img_create_sleep 0
after 200 [list set ::img_create_sleep 1]
vwait ::img_create_sleep

How to include files in icarus verilog?

I know the basic `include "filename.v" command. But, I am trying to include a module which is in another folder. Now, that module further includes other modules present in the same folder. But, when I try to run the module on the most top-level, I am getting an error.
C:\Users\Dell\Desktop\MIPS>iverilog mips.v
./IF/stage_if.v:2: Include file instruction_memory_if.v not found
No top level modules, and no -s option.
Here, I am trying to make a MIPS processor, which is contained in the file "mips.v". The first statement of this file is "`include "IF/stage_if.v". And, in the IF folder, there are numerous files present which I have included in stage_if.v, one of which is "instruction_memory_if.v". Below is the directory level diagram.
-IF
instruction_memory_if.v
stage_if.v
+ID
+EX
+MEM
+WB
mips.v
You need to tell iverilog where to look using the -I flag.
In top.v:
`include "foo.v"
program top;
initial begin
foo();
end
endprogram
In foo/foo.v:
task foo;
$display("This was printed in the foo module");
endtask
Which can be run using the commands:
iverilog -g2012 top.v -I foo/
vvp a.out
>>> This was printed in the foo module

neo4j-import tool/csv files

I'm trying to import some nodes+relationships using neo4j-import but seem to have encountered some problems. I went into the bin directory, where the import tool is hosted, and typed in the following:
./neo4j-import --into graph.db --nodes CLass.csv --nodes Company.csv --nodes Person.csv --nodes ResearchField.csv --nodes ResearchGroup.csv --nodes project.csv --relationships rels.csv
Below are the a snapshot of my files when I type in "emacs":
Class.csv:
ClassId:ID,name,:LABEL
3,Discrete Mathematics,Class
4,Introduction to Digital Design,Class
5,Solar System Physics,Class
Company.csv
CompanyId:ID,name,:LABEL
395,AirForce,Company
396,MITRE Corporation,Company
397,Lockheed Martin,Company
The other nodes are structured in a similar way. As for emacs rels.csv, this is what I have:
:START_ID,:END_ID,:TYPE
422,446,Directs
422,447,researches
422,430,researches
However, when I tried to execute, this error message is returned: ]
Input error: Expected '--nodes' to have at least 1 item, but had 0 ([])
...and if I remove the "./" in the beginning, this is returned:
bash: neo4j-import: command not found
Can you guys let me know what did I do wrong?
It might be the capital L in your filename (CLass.csv) which might cause it to find nothing.
Otherwise I would try it with only one --nodes argument at a time to figure out which file is the problem and go from there.
The ./ is definitely needed as that is how you execute binaries on *NIX-style systems