[PATCH] Add lvgl_hello: Sample Hello world app using littleVGL and libbsd

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Thu Sep 12 08:28:26 UTC 2019


On Wed, Sep 11, 2019 at 4:38 PM Christian Mauderer <
christian.mauderer at embedded-brains.de> wrote:

> On 11/09/2019 10:48, Vijay Kumar Banerjee wrote:
> >
> >  Hi,
> >
> > Since adding I2C in BBB initialization seems like the right solution,
> > should we ask
> > in devel and user lists in a separate thread, to know if anyone is
> > opposed to this change?
>
> Hello Vijay,
>
> just send a patch. That will start the discussion if someone objects to it.
>
> >
> > Where should I be looking for to add i2c in BBB initialization?
>
> Please take a look at the dependencies. If there are any (like clocks or
> similar) you have to add it afterwards.
>
> Take a look at some other BSPs where similar hardware (like I2C, SPI,
> some external chips, ...) is initialized. For example the mvme3100 uses
> a RTEMS_SYSINIT_ITEM to pick a random sample. But I think most BSPs use
> a special init function similar to the one in BBB.
>
> Hi,

I tried a very similar approach and added RTEMS_SYSINIT_ITEM
:
```
diff --git a/bsps/arm/beagle/start/bspstart.c
b/bsps/arm/beagle/start/bspstart.c
index 224f9ecf3b..35839e774b 100644
--- a/bsps/arm/beagle/start/bspstart.c
+++ b/bsps/arm/beagle/start/bspstart.c
@@ -17,6 +17,8 @@
 #include <bsp/irq-generic.h>
 #include <bsp/fdt.h>
 #include <bsp/linker-symbols.h>
+#include <bsp/i2c.h>
+#include <rtems/sysinit.h>

 #include "bspdebug.h"

@@ -41,3 +43,15 @@ uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t
icells)
 {
   return intr[0];
 }
+
+static void bbb_i2c_0_initialize(void)
+{
+  bbb_register_i2c_0();
+}
+
+RTEMS_SYSINIT_ITEM(
+  bbb_i2c_0_initialize,
+  RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+  RTEMS_SYSINIT_ORDER_MIDDLE
+);
```
This is successfully calling the `am335x_i2c_bus_register` but
the issue with this approach is that it's returning the following
internal error after `am335x_i2c_reset` call.
```
_Terminate (the_source=the_source at entry=INTERNAL_ERROR_CORE,
the_error=the_error at entry=30)
```

Any hint on what might be the cause of the error?

> Best regards
>
> Christian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190912/f180098c/attachment.html>


More information about the devel mailing list