Running AN10122 Example

If you have a simple question and just want an answer.
Post Reply
stnschrdr
Member
Posts: 13
Joined: Thu Jan 24, 2019 7:35 pm

Running AN10122 Example

Post by stnschrdr »

I'm trying to run the 'AN10122_xtimecoposer_reading_from_a_file' project, associated with the application note AN10122.
I get error 'Error: _open failed' and am not sure why.

- I was able to Build the project without any problems; I only had problems running it.
- I'm using xTIMEcomposer ver 14.3.3 on Windows 10.
- I've created a .txt file called 'test.txt' and written inside it ten decimal numbers separated by spaces (I also tried a couple of sentences). It wasn't clear where exactly to save
this file. My project is in /workspace/AN10122_xtimecomposer_reading_from_a_file/. I tried saving test.txt in /workspace/ as well as /workspace/AN10122_xtimecomposer_reading_from_a_file/ , but both gave me the same error. Not sure, which is my 'current directory' or 'raw system call functions directory'. I've been able to run other applications in my /workspace/ , which also contains library folder, without any problems.

Not sure what I am doing wrong.


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. View the project tree structure and specifically the location (properties) of the executable with the .xe suffix.

For my box:

Code: Select all

AN10122_xtimecomposer_reading_from_a_file\bin
so the executable resides inside the bin folder. Try and drop your text file inside that sub-folder, try again and post your results.
stnschrdr
Member
Posts: 13
Joined: Thu Jan 24, 2019 7:35 pm

Post by stnschrdr »

Hi. Strange, even when I place the test.txt file in \AN10122_xtimecomposer_reading_from_a_file\bin\ I get the same 'Error: _open failed' error. I see that the .xe is also in \bin\.
stnschrdr
Member
Posts: 13
Joined: Thu Jan 24, 2019 7:35 pm

Post by stnschrdr »

OK, I got it working. Weird, I tried placing the 'test.txt' file back in \AN10122_stimecomposer_reading_from_a_file\ and it successfully opened and printed to the Console. This was after I successfully ran the opposite AN10123 application, which WRITES to 'test.txt' file defaulted to location \AN10121_xtimecomposer_writing_to_a_file\ . I noticed the similarities in the code of the two applications. I guess the first time I thought I tested this test.txt file locations I didn't actually place it in that location. Sorry for wasting your time. :)
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Excellent! Thanks for the update for closure.
Post Reply