STM32H7 startup test in RTEMS 4-11.3

2020-09-16 Thread Catalin Demergian
Hi, I'm trying to add some start-up tests in the RTEMS 4-11.3 code base for a STM32H7 MCU. One of them is a RAM test. After this test, all the contents of 128K RAM (0x2000..0x2001) will be only zeros. What I do now is I perform a reset after the RAM test, but what I want to do is to restor

Re: external flash partitions

2019-10-14 Thread Catalin Demergian
ok. for me it's done, I can use JFFS2 on my flash already, but is just one 2MB partition. the question is can I make partitions on my flash ? with a utility or writing my own code ? thank you, Catalin On Tue, Oct 15, 2019 at 8:56 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: >

external flash partitions

2019-10-14 Thread Catalin Demergian
Hello, I have RTEMS 4-11.3 running on STM32H7. I also have an external (via QSPI) external flash. Here is a simple questions for people who done this in the past: how can I make partitions on the flash programmatically ? or even what RTEMS shell command can I use to create/delete partitions ? or d

JFFS2

2019-10-08 Thread Catalin Demergian
Hello, My setup is RTEMS 4-11.3 on a STM32H7 with an external QSPI flash (IS25LP016D). I have to write the code that communicates with IS25LP016D to accomplish read/write/erase. I want to use JFFS2 FS on this flash device. Since I'm not very familiar with JFFS2 internals yet, just a few questions:

Re: move code from interrupt context to task context

2019-09-04 Thread Catalin Demergian
ise, clock-dirft-free periodic task to execute ? maybe keep a HW ISR and resume my task from there with rtems_task_resume (can rtems_task_resume be used in ISR ?) regards, Catalin On Tue, Aug 20, 2019 at 4:27 PM Joel Sherrill wrote: > On Tue, Aug 20, 2019 at 7:50 AM Catalin Demer

move code from interrupt context to task context

2019-08-20 Thread Catalin Demergian
Hello, The context is RTEMS-4.11.3 on STM32H7. I have a timer interrupt routine and I'm calling some functions from it. I would like to write a RTEMS task (rtems_task_create API) and call those functions from that thread instead of calling them from interrupt context. Of course, I have to call the

Re: RTEMS scheduler bug ?

2019-04-09 Thread Catalin Demergian
Hi, My device just passed a 24h long duration test, I can say now that this issue is history. Since we were looking at this for quite a while, I would like to thank you, Sebastian for your prompt & useful support ! regards, Catalin On Fri, Mar 29, 2019 at 11:56 AM Catalin Demergian w

Re: RTEMS scheduler bug ?

2019-04-04 Thread Catalin Demergian
rupts at 200Hz each, and a CAN interrupt at about 36Hz. > ” > > > > When I ported RTEMS5 to the STM32F7, I ran into the same issue and used > the same method to get around it. > > I hope this helps. > > Andrei > > > > > > On 2019-April-03, at 07:46, Sebastia

Re: RTEMS scheduler bug ?

2019-04-03 Thread Catalin Demergian
Huber < sebastian.hu...@embedded-brains.de> wrote: > On 02/04/2019 16:28, Catalin Demergian wrote: > > I did more tests. it seems not the same type of error happens every > > time. I got the _Configuration_Scheduler_priority_dflt a few times, > > but also > > the &

Re: RTEMS scheduler bug ?

2019-04-02 Thread Catalin Demergian
0.114388 | 0.029 ++---+- TIME SINCE LAST CPU USAGE RESET IN SECONDS: 393.836064 --- [/] # It seems it's 3. (I've seen values as 2 or 4 at other test runs) Catalin On Tue, Apr 2, 2019 at 4:37 AM Catalin Deme

Re: RTEMS scheduler bug ?

2019-04-02 Thread Catalin Demergian
it's just the way Eclipse shows it, it's part of the call stack, but not the name of a normal function. On Tue, Apr 2, 2019 at 2:02 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > > On 02/04/2019 12:59, Catalin Demergian wrote: > > Hi, > &

Re: RTEMS scheduler bug ?

2019-04-02 Thread Catalin Demergian
s issue). Call stack looks like this Thread #1 (Suspended:Signal:SIGINT:Interrupt) _ARMV7M_Exception_default() at armv7m-exception-default.c:25 0x805aff0 () at 0xfffd _Configuration_Scheduler_priority_dflt() at 0x2400063c regards, Catalin On Mon, Apr 1, 2019 at 5:51 AM Catalin Deme

Re: RTEMS scheduler bug ?

2019-04-01 Thread Catalin Demergian
yes, removing the build dir did the trick :) I'll start a test with the assert in and let you know. Catalin On Mon, Apr 1, 2019 at 3:31 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 01/04/2019 14:28, Catalin Demergian wrote: > > Yes, I made a test, _IS

Re: RTEMS scheduler bug ?

2019-04-01 Thread Catalin Demergian
ll run for nothing without it, it seems the Assert is defined to nothing if this is not set right. regards, Catalin On Fri, Mar 29, 2019 at 3:36 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 29/03/2019 14:31, Catalin Demergian wrote: > > Sure, I w

Re: RTEMS scheduler bug ?

2019-03-29 Thread Catalin Demergian
t use the tick interrupt itself ? How does that work on RTEMS ? On Fri, Mar 29, 2019 at 12:04 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello Catalin, > > On 29/03/2019 10:56, Catalin Demergian wrote: > > Hi, > > We had some time ago (sept/oct

RTEMS scheduler bug ?

2019-03-29 Thread Catalin Demergian
Hi, We had some time ago (sept/oct 2018) a long discussion where I was suspecting a scheduler issue (subject "rtems_message_queue_receive/rtems_event_receive issues") We got to the point where I realized that _Chain_Append_unprotected might fail to add an element in the queue, with the effect of h

Fwd: RTEMS error codes

2018-11-06 Thread Catalin Demergian
-- Forwarded message - From: Catalin Demergian Date: Tue, Nov 6, 2018 at 5:14 PM Subject: RTEMS error codes To: Sebastian Huber Hello, I'm trying to integrate a USB device stack in 4.11.3 for STM32H7 and after I called my USB initialization function just before initializin

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-25 Thread Catalin Demergian
018 13:03, Catalin Demergian wrote: > > This is really strange. If you use cpsid/cpsie around the append_cnt ++ > > and --, then append_cnt should never be > 1. If this really the case, > > then this looks like a processor bug. > > -> No, after I saw that it didn't fi

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-25 Thread Catalin Demergian
out the dis/en in the code. On Thu, Oct 25, 2018 at 12:17 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 25/10/2018 11:00, Catalin Demergian wrote: > > Hi, > > First, I would like to conceptually understand how a function as > > simple as _Chain_

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-25 Thread Catalin Demergian
3 ? are there any changes in this area ? regards, Catalin On Wed, Oct 24, 2018 at 3:00 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > > On 24/10/2018 11:10, Catalin Demergian wrote: > > Hi, > > I made a debug patch with some changes > &g

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-24 Thread Catalin Demergian
ecause the state is READY so _Event_Is_blocking_on_event returns FALSE. Could this theory be valid ? regards Catalin On Tue, Oct 23, 2018 at 1:47 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 23/10/2018 10:44, Catalin Demergian wrote: > > Hi, > > I'm logging

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-23 Thread Catalin Demergian
l that gives me microsecond precision ? regards, Catalin On Mon, Oct 22, 2018 at 4:37 PM Catalin Demergian wrote: > Hi, > I see _Scheduler_priority_Ready_queue_enqueue > calls _Chain_Append_unprotected > which has an interesting comment > * @note It does NOT disable interrupts

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-22 Thread Catalin Demergian
ded-brains.de> wrote: > On 22/10/2018 15:00, Catalin Demergian wrote: > > I started to look in the ready queues implementation. I added a debug > > patch tracing my tasks having priority=100. > > The way I see it, a task can enter a

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-22 Thread Catalin Demergian
tian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 12/10/2018 10:40, Catalin Demergian wrote: > > Hi, > > I still think it would be worth to try the latest RTEMS master just to > > make sure we don't search a bug which is already fixed. Also RTEMS 5 has > > more

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-12 Thread Catalin Demergian
and the USB event set. regards, Catalin On Fri, Oct 12, 2018 at 12:13 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 11/10/2018 15:37, Catalin Demergian wrote: > > Hi, > > Yes, there is a call to rtems_task_wake_after in the code; but in that > > ca

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-11 Thread Catalin Demergian
? could that value be corrupt ? I tried with the stack checker as well, but I didn't see any out of band values. Catalin On Thu, Oct 11, 2018 at 11:17 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 11/10/2018 09:52, Catalin Demergian wrote: > > Hi, &g

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-11 Thread Catalin Demergian
RTEMS. any link to information on how to detect/analyze a data coruption in RTEMS can be useful. regards, Catalin On Thu, Oct 11, 2018 at 8:50 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 10/10/2018 16:18, Catalin Demergian wrote: > > > > Hi, > > &

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-10 Thread Catalin Demergian
> > Hi, I got into another issue when I tried ping -f [/] # assertion "the_watchdog->state == WATCHDOG_ACTIVE" failed: file "../../../../../../c/src/../../cpukit/score/src/watchdogremove.c", line 34, function: _Watchdog_Remove_it *** PROFILING REPORT BEGIN PMC_APP *** 2 1

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-10 Thread Catalin Demergian
0x%08x\n" is printed somewhere, but I don't know how to see these messages in RTEMS, is there a command like dmesg in Linux ? regards, Catalin On Tue, Oct 9, 2018 at 10:00 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 09/10/2018 08:48, Catalin Demer

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-08 Thread Catalin Demergian
led because the_thread->current_state = 0. do I have to set something else besides unblock=true to unblock my task ? regards, Catalin On Fri, Oct 5, 2018 at 3:58 PM Catalin Demergian wrote: > Hi, > First of all, I verified if I have this fix in my code base and I do have > it. > > &

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-05 Thread Catalin Demergian
I would see the thread making progress. Maybe there is a synchronization issue with the wait flags that I don't understand. regards, Catalin On Fri, Oct 5, 2018 at 10:06 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > > On 04/10/2018 15:33, Catalin Deme

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-04 Thread Catalin Demergian
thing because unblock = FALSE .. so the task never runs again, but state remains marked as READY. is this a bug ? or I'm not understanding correctly? regards, Catalin On Wed, Oct 3, 2018 at 2:42 PM Catalin Demergian wrote: > ok, I understand. The code in _Event_Is_blocking_on_event i

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-03 Thread Catalin Demergian
ok, I understand. The code in _Event_Is_blocking_on_event is correct, it just verifies if the thread is in wait state or not. The only thing that varies is what _Thread_Wait_flags_get returns. In my case, it returned 0x102 for 5401 times, but 5402th time it returned 0x104; because of that, ( wait_f

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-02 Thread Catalin Demergian
ay every time. Now .. why would _Event_Is_blocking_on_event fail ? regards, Catalin On Tue, Oct 2, 2018 at 9:55 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 02/10/2018 08:48, Catalin Demergian wrote: > > Hi, > > This assert may not be directly related to m

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-01 Thread Catalin Demergian
0/2018 08:55, Catalin Demergian wrote: > > Hello, > > After enabling RTEMS_DEBUG like you told me, I found the test I left > > running over the weekend like this > > > > [/] # > > > > [/] # > > > > [/] # assertion "first != _Chain_

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-10-01 Thread Catalin Demergian
I'm using 4.11.2 Catalin On Mon, Oct 1, 2018 at 10:16 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 01/10/2018 08:55, Catalin Demergian wrote: > > Hello, > > After enabling RTEMS_DEBUG like you told me, I found the test I left > > ru

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-30 Thread Catalin Demergian
sh ? regards, Catalin On Mon, Oct 1, 2018 at 9:20 AM Catalin Demergian wrote: > Yes, I can use prints at the console. > > > On Mon, Oct 1, 2018, 08:46 Sebastian Huber < > sebastian.hu...@embedded-brains.de> wrote: > >> On 27/09/2018 15:47, Catalin Demergian wrot

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-30 Thread Catalin Demergian
Yes, I can use prints at the console. On Mon, Oct 1, 2018, 08:46 Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 27/09/2018 15:47, Catalin Demergian wrote: > > I tried the idea with RTEMS_DEBUG, but I could reproduce the problem > > and nothing ap

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-27 Thread Catalin Demergian
omething happens in the dispatcher, because > the dispacther should take tasks from the ready queue > and put them on the CPU. > > regards, > Catalin > > > > > On Wed, Sep 26, 2018 at 10:54 AM Chris Johns wrote: > >> On 26/09/2018 16:43, Catalin Demergian wrote: >&

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-26 Thread Catalin Demergian
rom the ready queue and put them on the CPU. regards, Catalin On Wed, Sep 26, 2018 at 10:54 AM Chris Johns wrote: > On 26/09/2018 16:43, Catalin Demergian wrote: > > When you say "changing the makefiles" who's makefiles are these? > > -> for example lib/rtems-4

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-26 Thread Catalin Demergian
.de> wrote: > On 25/09/2018 13:37, Catalin Demergian wrote: > > Hi, > > what does it mean exactly to run with the RTEMS master ? > > The RTEMS Git master branch. > > > > > The problem is like this: I initially had a USB stack for my STM32F7 > > tha

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-25 Thread Catalin Demergian
n the code base I had Do you have a JTAG debugger that can set breakpoints and step at the instruction level? -> yes regards, Catalin On Wed, Sep 26, 2018 at 1:10 AM Chris Johns wrote: > On 25/09/2018 21:37, Catalin Demergian wrote: > > what does it mean exactly to run with the RTE

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-25 Thread Catalin Demergian
u...@embedded-brains.de> wrote: > On 25/09/2018 12:46, Catalin Demergian wrote: > > Hi, > > This is the result of task command in shell after SCrx task gets stuck > > > > [/] # task > > > > ID NAME

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-25 Thread Catalin Demergian
cheduled to obtain the message. > > Best regards, > Mingyu > > 2018-09-18 20:20 GMT+08:00 Catalin Demergian : > >> Hello, >> I am using RTEMS 4.11.2 and I tried first to use RTEMS message queues in >> my USB FS driver. >> I'm populating the queue from th

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-20 Thread Catalin Demergian
Hi, I saw an event basically means setting a bit in a 32 bit integer, so, yes, they don't queue. I got into the same issue with rtems_message_queue_receive(RTEMS_NO_TIMEOUT), it blocks even if there are messages in the queue like I said. Not even rtems_message_queue_receive without timeout didn't r

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-20 Thread Catalin Demergian
ck ISR is still responded when USB ISR exits, > so that the kernel task can be scheduled to obtain the message. > > Best regards, > Mingyu > > 2018-09-18 20:20 GMT+08:00 Catalin Demergian : > >> Hello, >> I am using RTEMS 4.11.2 and I tried first to use RTEMS message que

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-20 Thread Catalin Demergian
lock ISR is still responded when USB ISR exits, > so that the kernel task can be scheduled to obtain the message. > > Best regards, > Mingyu > > 2018-09-18 20:20 GMT+08:00 Catalin Demergian : > >> Hello, >> I am using RTEMS 4.11.2 and I tried first to use RTEMS messa

Re: rtems_message_queue_receive / rtems_event_receive issues

2018-09-19 Thread Catalin Demergian
.11.2) > works as expected. > 2. ensure to disable/lock interrupts while operating the message_queue inside > USB ISR. Try to check if clock ISR is still responded when USB ISR exits, > so that the kernel task can be scheduled to obtain the message. > > Best regards, > Min

rtems_message_queue_receive / rtems_event_receive issues

2018-09-18 Thread Catalin Demergian
Hello, I am using RTEMS 4.11.2 and I tried first to use RTEMS message queues in my USB FS driver. I'm populating the queue from the ISR and then use rtems_message_queue_receive from a kernel task to read the messages. After some debugging sessions I came to the conlusion that rtems_message_queue_re