-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Update to RTEMS 6 #55
base: master
Are you sure you want to change the base?
Conversation
This is based on Weizhong Xu's work for PMOD DIO
Note that at the moment building the toolchain doesn't work. Reason for this is the transition of the RTEMS environment to gitlab. Seems that the git.rtems.org has been switched off before the rtems-source-builder has been adapted to work with that. I asked about that on the RTEMS discord and someone is already working on it. So I think I can updated the pull request in a few days. |
8fa7ceb
to
d295247
Compare
0d60fba
to
97e74db
Compare
I tried to build OTP and deploy on the board but unfortunatly it did not work. |
@@ -14,7 +14,7 @@ exec_prefix = $(RTEMS_ROOT)/$(RTEMS_CPU)-rtems$(RTEMS_API) | |||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg | |||
|
|||
DEPFLAGS = -MT $@ -MD -MP -MF $(basename $@).d | |||
SYSFLAGS = -B $(PROJECT_LIB) -specs bsp_specs -qrtems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the bsp_specs file gone? Is'nt it needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bsp_specs
have been removed from RTEMS. They are not necessary any more. I'm not even sure whether they had been necessary in your version or whether they have been an empty file already.
Please note: The bsp.mk is also something that is not supported by RTEMS any more. It's a compatibility hack that it's still in the grisp2-rtems-toolchain
. Maybe it would be a good idea to remove it some-when. The usual method now is to have an application specific make file that collects the necessary flags using pkg-config. For example that one:
There is also the rtems_waf
repo that you can use if you want to write an application with a waf based build system.
Do you have a console output of the boot process? |
shell_output.txt |
Thanks for the output.
From the output:
But - and that could be important: The mount for the mmcsd-1-0 seemed to take longer than expected. There is already a line
before the partition is mounted some lines later:
|
@c-mauderer The fact that we print |
I can report that adding a delay skips this issue, looks like Another interesting crash happens if I enable the wpa_supplicant: |
Thanks for the tests. That are not the kind of problems I would have expected. Seems that there will be some debugging necessary. Regarding the filesystem, it will be necessary to do some lower level checks. Like trying The WLAN is a bit odd too. It clearly detected the USB device which means that a lot of stuff worked. But it's a "device not configured". Maybe a problem with the firmware. I'm not sure yet, when I'll find time to debug that. |
Ok the |
That sounds great. The Maybe we have some conflict with the event number in libgrisp. Could be worth to replace that with a binary semaphore. If you can confirm, that you don't have a RTEMS_TIMEOUT, I'll replace that in libgrisp. |
Yep, we do not get a timeout, the code in
I always see
|
@c-mauderer if you check https://github.com/user-attachments/files/15924257/shell_output.txt you can spot that |
Quite possible. The event is a bit hacked into that and doesn't differ between the SD cards. It just sends the event if anything has been successfully mounted. We maybe would need some kind of interface to specify which SD card is the one the task waits for. Do you know that before the call to the You control quite some aspects from your Erlang code. Would it be more useful to process the media listener events there too so you have access to the full information? In that case, we maybe can just throw that part out of |
Exactly, I tried moving the fdt code that sets the
Not sure how much code would need to be rewritten to use erlang, plus we need the mount to succeed BEFORE we start the erlang VM, because we read the boot arguments from the grisp.ini file. So I do not see how it would be possible with a standard erlang app. |
If you touch that area, I would suggest to also replace the event by a condition variable. With that, you can avoid that you get problems if you call the You only need it once in the system, so a global variable that you set before the
I noted some |
I tried with the rtems condition variable and while it works, I loose the reaction to the timeout which I cannot set with those functions, we probably want to keep the old behaviour in case of mount errors. |
Ethernet is ok and I can connect using TLS and the secure element, so that is nice. But the WPA supplicant looks like is stuck, it gets initialized but does not negotiate anything... |
Can you run the default shell ifconfig on the wlan0 interface? The FreeBSD ifconfig prints a lot of status information with that. There has also been an update in the wpa supplicant during some libbsd update. If I remember correctly, there have been some problems with that software because an independent port upstreamed some changes that conflicted with the ones in our libbsd. I'm not sure whether it has been tested after that update. I maybe have to test that on some other platform. |
wlan0_not_exist.txt |
I have rebased the necessary patches for RTEMS and libbsd to RTEMS 6 and updated the grisp2-rtems-toolchain. It was more a side effect of some other work. So I didn't test the new version yet on the hardware (therefore the Draft-status). If you want, you can test it and pull in the changes if everything works. That would solve #52. All patches for #42 and #50 are included too so that would close these pull requests too.
Note that I didn't push RTEMS and LibBSD to the GRiSP organization yet. The following two branches are necessary for this patch.