Code Monkey home page Code Monkey logo

lupyuen.github.io's Introduction

Lup Yuen's Articles

Please feel free to reproduce and/or translate my articles... And promote IoT Education for all! ๐Ÿ™‚

The articles are mirrored to Codeberg Pages at lupyuen.codeberg.page

Lup Yuen's Resume

  1. Lup Yuen's resume at https://lupyuen.github.io is powered by JSON Resume, the interoperable standard format for resumes: https://jsonresume.org

    The resume uses the StackOverflow theme: https://www.npmjs.com/package/jsonresume-theme-stackoverflow

  2. To create your own resume, clone this repository and install the libraries:

    git clone https://github.com/lupyuen/lupyuen.github.io.git
    cd lupyuen.github.io
    ln -s resume.json my.resume.json
    npm install
  3. Edit my.resume.json with Visual Studio Code and the JSON Resume Extension: https://marketplace.visualstudio.com/items?itemName=reflog.jsonresume

  4. Configure the JSON Resume theme in the User Settings for Visual Studio Code (change /Users/Luppy to the folder containing lupyuen.github.io):

    "JSONResume.theme": "/Users/Luppy/lupyuen.github.io/node_modules/jsonresume-theme-stackoverflow",
    
  5. The JSON Resume Extension only works for files named *.resume.json, hence we created a symbolic link from my.resume.json to resume.json, which is the filename expected by the command-line tools.

  6. To generate the HTML (index.html) and PDF (lupyuen.pdf) resume files, run:

    scripts/gen-resume-html.sh
    scripts/gen-resume-pdf.sh
  7. To publish the HTML and PDF resume files to GitHub Pages (like https://lupyuen.github.io), check out https://pages.github.com/

lupyuen.github.io's People

Contributors

gniezen avatar lupyuen avatar tiwalun avatar yf13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lupyuen.github.io's Issues

LVGL8 isn't compat with LVGL demos

Hi, and thank you (again). I was about to drive a 7735 from BL602, and thought I'd give your demos a try.
Of course, the resolution is wrong and the chip is wrong, but I thought that would be a few easy #defines to tweak. Of course, it never is that easy.

In section 10.2 of there is a git submodule add https://github.com/lvgl/lvgl , which pulls in trunk of LVGL.

"And that's where the plot sours."

LVGL seems to hold cross-version compatibility is low regard, which is an unfortunate trait for a library. I scoured dozens and dozens of reports and complaints and the general advice for those with existing code is to basically not upgrade. In https://forum.lvgl.io/t/lvgl-v8-is-available-for-testing/4924/68 one of th maintainers says "one either has to rewrite their entire application, or stick with the older major release and patch it."

Your demos seem to be written for LVGL7.something (determining which 7.something isn't trivial) but the LVGL trunk is now 8.2 and they incompatible. I got as far as the changes below and then I ran into dozens of link errors.

Realizing I was drifting further and further from my goal ("easy sanity check of hardware") and needing to change the chip drivers, enter an untested land of LVGL, to ultimately do it all on another OS, and battling Git in wanting to take a submodule from a branch, I realized I was in the Sunk Cost Fallacy and needed to flee. Exactly none of this is your fault and some of it was expected. I merely post this as a cautionary tale (and Google fodder) to those expecting to build these projects.

I post this with absolutely no expectations of fixes. If anything, the smart money for your project is to just pin the module to whatever version of LVGL you were happily using.

Thank you for all the examples.

--- a/customer_app/sdk_app_st7789/sdk_app_st7789/lv_port_disp.c
+++ b/customer_app/sdk_app_st7789/sdk_app_st7789/lv_port_disp.c
@@ -75,9 +75,14 @@ void lv_port_disp_init(void)
/* LVGL requires a buffer where it draws the objects. The buffer's has to b
e greater than 1 display row
* We create ONE buffer with 10 rows. LVGL will draw the display's content
here and writes it to the display
* */

+#if 0
static lv_disp_buf_t disp_buf_1;
lv_disp_buf_init(&disp_buf_1, spi_tx_buf, NULL, LV_HOR_RES_MAX * BUFFER_ROW
S); /Initialize the display buffer/
+#else

  • static lv_disp_draw_buf_t disp_buf_1;

  • static lv_color_t buf_1[LV_HOR_RES_MAX * 10]; /A buffer for 10 rows/

  • lv_disp_draw_buf_init(&disp_buf_1, buf_1, NULL, LV_HOR_RES_MAX * 10); /Initialize the display buffer/
    +#endif

    /*-----------------------------------

    • Register the display in LVGL
      @@ -96,7 +104,9 @@ void lv_port_disp_init(void)
      disp_drv.flush_cb = disp_flush;

    /Set a display buffer/
    +#if 0
    disp_drv.buffer = &disp_buf_1;
    +#else

  • // do something
    +#endif

#if LV_USE_GPU
/Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)/

 diff --git a/customer_app/sdk_app_st7789/sdk_app_st7789/lvgl.c b/customer_app/sdk_app_st7789/sdk_app_st7789/lvgl.c

index 7f61ba12..9f0a361e 100644
--- a/customer_app/sdk_app_st7789/sdk_app_st7789/lvgl.c
+++ b/customer_app/sdk_app_st7789/sdk_app_st7789/lvgl.c
@@ -54,11 +54,11 @@ int lvgl_create(void) {
lvgl_created = true;
printf("Create LVGL widgets...\r\n");

  • btn = lv_btn_create(lv_scr_act(), NULL); // Add a button the current screen
  • btn = lv_btn_create(lv_scr_act()); // Add a button the current screen
    lv_obj_set_pos(btn, 10, 80); // Set its position
    lv_obj_set_size(btn, 220, 80); // Set its size
  • label = lv_label_create(btn, NULL); // Add a label to the button
  • label = lv_label_create(btn); // Add a label to the button
    lv_label_set_text(label, "BL602 LVGL"); // Set the label text
    return 0;
    }
    @@ -88,4 +88,4 @@ int lvgl_render(void) {
    // Call LVGL to render the display and flush our display driver
    lv_task_handler();
    return 0;
    -}
    \ No newline at end of file
    +}

Hello example in Nuttx kernel build

First I want to thanks your articles, they help me to start up this project a lot and it's really excellent.

Currently, I read this article and build Nuttx for RISC-V successfully.
But there is a little problem, when I run Nuttx with Qemu, it should can run hello example but this operation failed.

Ox64: NuttX can boot from flash

I managed to get NuttX to boot from the Ox64's (128Mib) flash and thought I'd share the process for doing so here. See this gist for instructions.

This quick proof of concept implementation works by replacing the U-Boot image in the OpenBouffalo builds. The smarter way to do it would be to build both U-Boot and the NuttX image into the flash image (similar to what's done here); then one could leverage U-Boot to e.g. load additional DTBs.

microSD-Card question

Lup, thanks for, as always, providing some excellent technical content. I bought several of the Ox64's when they first appeared and had lots of problems with the SD not being recognized due to a timeout issue (link: openbouffalo/buildroot_bouffalo#16). As a result, I haven't used them since. What is the SanDisk microSD card you used and do you know what the timeout issue is caused by and if it will ever be resolved?

Instructions for "Preview PineTime Watch Faces in your Web Browser with WebAssembly"

Reference - https://lupyuen.github.io/pinetime-rust-mynewt/articles/simulator

The problem appears to be inaccurate, incomplete, or out-dated instructions.

I can't get item 3 "Add GitHub Actions to our Fork" to work.

So far it has failed with two errors:

  1. Incorrect path in "Copy WatchFace.cpp to LVGL for WebAssembly"
    This was simply fixed by supplying the path in lowercase characters, instead of mixed case.

Please see - https://github.com/CMMUX/InfiniTime/runs/3644438471?check_suite_focus=true if you wish to correct your simulate.yml.

  1. Unable to find "date/date.h" in "Build LVGL for WebAssembly".

Please see - https://github.com/CMMUX/InfiniTime/runs/3644468978?check_suite_focus=true

Please advise how to fix this issue or produce a fix, so I can continue with the instructions.

Thank you for your help.

CSS Issue

Hello, I happened to chance upon your resume site after watching Engineers.SG's video on your IoT Mission! I am impressed with your layout until i reach the bottom...

image

Better Open Source Advocate

Regarding: https://lupyuen.github.io/articles/advocate

Be Kinder

I think it's better to treat the problem at the source - rather than be kinder, try to be happier, and in doing so you will become kinder. Only happy people can be the best version on themselves ๐Ÿ‘

Also of course don't underestimate how much awesome work and effort you've already done, which is in itself an act of kindness. As a general rule I also suggest not helping those who make no effort to help themselves, your time is limited and you will quickly burn yourself out teaching people things they could have easily found themselves.

Keep on Writing and Committing

I would suggest to write a series of smaller pieces more regularly. Try to capture the moment and give progress updates. Currently your articles read more like mini-books, where there are actually a few ideas in there. By publishing smaller and more frequently, you can also get more feedback early on - so it's win-win.

Timezone

Being in the wrong timezone is sometimes good too, not having to respond to millions of comments every waking moment allows me to get more work done :)

Stay Healthy

Hypertension and high blood pressure is nothing to laugh at. I would suggest seriously considering the keto diet, it has done a lot to improve my health and I'm sure it could do a lot for you too. You can't make an awesome open source future if your ticker packs up too early!

Keep up the great work!

bsp-files-per-project

Hi! How are you doing?

Lately i've picked up the bl702 and become sort of fan on this chip, i think it's quite versatile...

I'm trying to study the native iot_sdk with it's new Hosal HAL. Given that it's based off just plain Makefiles it's easy to follow for noob like me... Also the bl702 is not supported by Nuttx I think.

Anyway... I found that the sdk's BSP files are in components/platform/soc/bl702/bl702_std/BSP_Board/bl702_evb. And wanted to know if it's possible to over-ride these files locally in a per-project basis?

There is also the online intuitive GUI tool to generate these files (https://dev.bouffalolab.com/media/config/index.html). But still where to place these files?

Problem following https://lupyuen.github.io/articles/release#build-nuttx-for-star64

Greetings,
I found your wonderful articles on NuttX on Star64 and thought to try things out on VisionFive 2.

The quick, dumb test of released build failed to initialize file system
vf2-nuttx-test-run.txt

  /* Mount the file system containing the init program. */

  ret = nx_mount(CONFIG_INIT_MOUNT_SOURCE, CONFIG_INIT_MOUNT_TARGET,
                 CONFIG_INIT_MOUNT_FSTYPE, CONFIG_INIT_MOUNT_FLAGS,
                 CONFIG_INIT_MOUNT_DAT

I tried building from sources (on Raspberry Pi4/Raspian), but seem to be missing <math.h>

nuttx-riscv-build.txt

Following the article, I have been trying to use the released sources, rather than those in your repo.

Raspian:RasPi4:~/RISCV/NuttX/nuttx >>> cat .git/config 
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/apache/nuttx.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
Raspian:RasPi4:~/RISCV/NuttX/nuttx >>> uname -a
Linux Raspian4 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
Raspian:RasPi4:~/RISCV/NuttX/nuttx >>> 

I am probably doing something incredibly dumb. Any help in making progess on getting NuttX up on VisionFive2 is appreciated.

Thanks much!
-KenD

flash dt-bl10 board, using openocd

Hi hope you are well...

I've sucessfully connected to the above board using openocd (via jtag):

jtag
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Versaloon(0x15)by Simon(compiled on Dec 21 2018)
Info : USB_TO_XXX abilities: 0x00000208:0x010001E3:0xC0000007
Info : clock speed 100 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0x20000c05 (mfg: 0x602 (<unknown>), part: 0x0000, ver: 0x2)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 5 -expected-id 0x20000c05"
Warn : gdb services need one or more targets defined

and I have a *.bin file compiled...
but im not sure how do I flash it from here, your article pointed that'll it will be mentioned in the following article, but i couldnt find it.
how do I issue the flash command?

Cannot debug in vscode: Configured debug type 'gdb' is not supported

Hi,

I'm trying to set up debugging rust in vscode. I'm following your tutorial, everything works good until the Click Run โ†’ Start Debugging step - throws error Configured debug type 'gdb' is not supported:
(https://github.com/lupyuen/lupyuen.github.io/blob/master/src/debug.md#debug-rust-firmware-with-vscode)
obraz

It says, to set up gdb debugging, an extension is needed - could you show your vscode extension list?

I have such extensions installed:
obraz

Or it may be not an extension issue... Any help is appreciated.

Version of vscode: 1.52.1
System: Windows 10

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.