Search found 40 matches
- Tue Sep 27, 2011 5:49 pm
- Forum: Getting started
- Topic: stdio scanf
- Replies: 10
- Views: 10227
Re: stdio scanf
I received the recomendation of using sc_xlog instead. I think I will give it a try. It seems that for printstr is working correctly. only the scanf is missing, but for the moment I will continue in a different way. since I am using XC-3 I will use the additional ethernet connector for debuging purp...
- Mon Sep 26, 2011 3:33 pm
- Forum: General Questions
- Topic: Global Variables
- Replies: 18
- Views: 18719
Re: Global Variables
Not yet, but I will. I need to read the wiki info you send me
Thankyou tough!
Thankyou tough!
- Mon Sep 26, 2011 2:45 pm
- Forum: Getting started
- Topic: stdio scanf
- Replies: 10
- Views: 10227
Re: stdio scanf
will something like this do the trick? int _write(int fd, const char buf[], ___size_t count) { send_uart(buff,count); // udp_send(buff,count); -- or ethernet redirection } int _read(int fd, char buf[], unsigned count) { while(uart_empty); count = receive_uart(buff); return count; } ## pseudocode. I ...
- Mon Sep 26, 2011 2:40 pm
- Forum: Getting started
- Topic: stdio scanf
- Replies: 10
- Views: 10227
Re: stdio scanf
ok then. so I need to redefine int _write(int fd, const char buf[], ___size_t count); // syscall.h for printstr and printf I guess. and then I asume that for scanf it will be calling int _read(int fd, char buf[], unsigned count); // syscall.h am I right? But what about how should the new function be...
- Mon Sep 26, 2011 1:42 pm
- Forum: Getting started
- Topic: stdio scanf
- Replies: 10
- Views: 10227
Re: stdio scanf
Then I would need to build some hardware to use a serial port right? :-( I wanted to avoid that. but if there is no other option I will give it a try. Then I will add a UART to the project and... You can redirect stdout/in to a serial interface to avoid that. how can I redirect stdin/out to that ser...
- Mon Sep 26, 2011 1:15 pm
- Forum: General Questions
- Topic: Global Variables
- Replies: 18
- Views: 18719
Re: Global Variables - Solved
The application that I was trying to build is now running. A couple of tricks were needed but I would like to share some of them in the case that someone needs it. I tried with the hardware locks and even if those might be usefull depending on the implementation, it was not exactly that the solution...
- Mon Sep 26, 2011 1:00 pm
- Forum: Getting started
- Topic: stdio scanf
- Replies: 10
- Views: 10227
Re: stdio scanf blocking other cores and threads?
Thankyou for the previous info. Now I am experiencing another trouble eith scanf scanf is blocking somehow the mac_rx function. I test this behaviour in a default example so that anyone can reproduce it. sc_ethernet --> app_ethernet_demo3 In that example it is running as: on stdcore[2]: ethernet_ser...
- Fri Sep 23, 2011 12:49 pm
- Forum: General Questions
- Topic: Global Variables
- Replies: 18
- Views: 18719
Re: Global Variables
I saw that by using constants it is working and that's somehow it gave me the idea that I have read that somewhere before.
but now I cant find where I have read about using of mutexes.
I would suggest a Tutorial about it ;-)
but now I cant find where I have read about using of mutexes.
I would suggest a Tutorial about it ;-)
- Fri Sep 23, 2011 12:46 pm
- Forum: General Questions
- Topic: Global Variables
- Replies: 18
- Views: 18719
Re: Global Variables
I think I might find out why Thread0 acces it as: (read only) payload = Data_Globald.Nr[Nr].PortNo[TxPortNr].Word[j]; Thread1 the only trhead with (read-write) access Data_Globald.Nr[rqst.nr].PortNo[rqst.ports].Word[rqst.word] = rqst.value; Since the acces to the global variable is depending on othe...
- Thu Sep 22, 2011 2:18 pm
- Forum: General Questions
- Topic: Global Variables
- Replies: 18
- Views: 18719
Re: Global Variables
I can only second the argument to move from a shared array to channels - it is much easier and more robust. Ok thankyou! Now I have implemented the channels, but now I have another problem. I will explain the application I hope you can help me solve this. Use of "myVariable" violates the ...