Go to advanced search

by liletian.us
Mon Feb 10, 2020 10:21 pm
Forum: Raspbian
Topic: how to put together an os?
Replies: 8
Views: 232

Re: how to put together an os?

Hi Dickon Thank you for your kindly reply. Really appreciate your help. It is very detailed explained and thank you so much. It clarifies the different linuxes for me. I understand that redhat/debian are very similiar before. It's a simple(ish) recompile of debian/armhf for a lower-spec CPU that wa...
by liletian.us
Mon Feb 10, 2020 8:59 pm
Forum: Raspbian
Topic: how to put together an os?
Replies: 8
Views: 232

Re: how to put together an os?

It's an awful lot of effort for -- in the main -- very little reward. At present, you have three basic OSes: Debian, Redhat, and Gentoo, and virtually all the rest[0] -- Raspbian included -- are forks of those. Specifically, Ubuntu (amongst many others) forked Debian, and that in tern was forked in...
by liletian.us
Mon Feb 10, 2020 7:24 pm
Forum: Raspbian
Topic: how to put together an os?
Replies: 8
Views: 232

Re: how to put together an os?

It's wildly off-topic for here, but google for 'linux from scratch' and you won't go far wrong. You'll need to worry about the Pi's firmware (and likely the kernels), because they're non-standard, but it's quite possible to do what you want. Not that it's a good idea. It's actually very hard work, ...
by liletian.us
Mon Feb 10, 2020 7:04 pm
Forum: Raspbian
Topic: how to put together an os?
Replies: 8
Views: 232

Re: how to put together an os?

Hi All My understanding is the OS is an assemble of different tools like kernel to manager resource, gcc for tool development and different application software such as chrome, emacs? I am wondering if there is a tutorial which show how to assemble an os by yourself? Thank you for your inputs. Best...
by liletian.us
Mon Feb 10, 2020 6:56 pm
Forum: Raspbian
Topic: how to put together an os?
Replies: 8
Views: 232

how to put together an os?

Hi All My understanding is the OS is an assemble of different tools like kernel to manager resource, gcc for tool development and different application software such as chrome, emacs? I am wondering if there is a tutorial which show how to assemble an os by yourself? Thank you for your inputs. Best ...
by liletian.us
Mon Feb 10, 2020 6:41 pm
Forum: Bare metal, Assembly language
Topic: Does anyone know what is inside the bootcode.bin, start.elf?
Replies: 2
Views: 371

Does anyone know what is inside the bootcode.bin, start.elf?

Hi All I understand that when boot-up, start.elf and bootcode.bin are needed. Just wondering what do we need a elf file and a bin file here? What is the elf used for? Also, does anyone know what is inside those two files and are there source files for those two files? My last question is when if I g...
by liletian.us
Mon Feb 10, 2020 6:29 pm
Forum: Troubleshooting
Topic: Is my raspberry pi dead?
Replies: 1
Views: 87

Is my raspberry pi dead?

Hi Guys I have a raspberry pi 3B+ with 64 bits CPU. However, it used to work. Then one day it does not boot at all, so I have a look and found out that the SD card seems to have a problem. I then bought a new SD card with pre-installation. However, it still does not work. I then plug in the new SD c...
by liletian.us
Wed Feb 05, 2020 7:19 am
Forum: C/C++
Topic: what does this c code mean?
Replies: 10
Views: 1162

what does this c code mean?

Hi Guys Can anyone help me out with the following code? What does it mean? Does it mean #define LL_PTRS struct _llp *prev; struct _llp *next? If so, still what does it mean? #define LL_PTRS \ struct _llp *prev; \ struct _llp *next Thanks a lot, also, what does the following code mean? #define LL_PTR...
by liletian.us
Mon Feb 03, 2020 7:16 am
Forum: C/C++
Topic: how to set and read register value in C for raspberry pi in linux enviroment?
Replies: 7
Views: 985

Re: how to set and read register value in C for raspberry pi in linux enviroment?

Thank you very much! I did not read it carefully since I never realize it has a usage. Thank you, Best regards, Brian which registers are read-only registers? Read the documentation? https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf Each register (or ...
by liletian.us
Sun Feb 02, 2020 11:19 pm
Forum: C/C++
Topic: how to set and read register value in C for raspberry pi in linux enviroment?
Replies: 7
Views: 985

Re: how to set and read register value in C for raspberry pi in linux enviroment?

which registers are read-only registers?

Thanks

Brian
rpdom wrote:
Sun Feb 02, 2020 3:16 pm
Writing to the read-only registers (like the LEVEL register) get ignored.
by liletian.us
Sun Feb 02, 2020 9:02 am
Forum: C/C++
Topic: how to set and read register value in C for raspberry pi in linux enviroment?
Replies: 7
Views: 985

Re: how to set and read register value in C for raspberry pi in linux enviroment?

Hi Jojopi Thank you for the message. Yes, what confuse me is that if I can write to that register, I should be able to read it out so I can make sure the write command does happened. It does not look like we can read the set register. I guess you are right that the set register is a write-only regis...
by liletian.us
Sun Feb 02, 2020 6:42 am
Forum: C/C++
Topic: how to read the timer register in raspberry pi in linux environment?
Replies: 3
Views: 631

how to read the timer register in raspberry pi in linux environment?

Hi All There have a few weird things when I try to do the low level raspberry pi programming. I first do a memory map in raspberry pi following the same steps as https://www.pieter-jan.com/node/15. I know the timer is at offset address B400. I thus use memory mapping to get to the address 0x3F00B400...
by liletian.us
Sun Feb 02, 2020 6:41 am
Forum: C/C++
Topic: how to set and read register value in C for raspberry pi in linux enviroment?
Replies: 7
Views: 985

how to set and read register value in C for raspberry pi in linux enviroment?

Hi All There have a few weird things when I try to do the low level raspberry pi programming. I first do a memory map in raspberry pi following the same steps as https://www.pieter-jan.com/node/15. However, each time when I try to read the GPIO register values. for example *(gpio.addr+7)=1<<4; print...
by liletian.us
Thu Dec 12, 2019 5:03 am
Forum: Bare metal, Assembly language
Topic: how does the video file is generated in the raspberry pi tutorial?
Replies: 0
Views: 295

how does the video file is generated in the raspberry pi tutorial?

Hi All

Can anyone explain how the video file Video.lz is generated in the code from the following link?

https://github.com/PeterLemon/Raspberry ... GRBLZVideo

In another words, how does the raspberry pi decode the mpeg to display the video?

THank you,

Brian
by liletian.us
Mon Sep 09, 2019 4:57 am
Forum: Bare metal, Assembly language
Topic: some basic raspberry pi questions related to chadderz121 tutorials
Replies: 5
Views: 1440

Re: some basic raspberry pi questions related to chadderz121 tutorials

Hi bzt Thank you very much for the reply. I appreciate your helps. It will take me some time to digest those info and I will follow up after that. Thank you so much, Brian Hi, I'll try to answer some of your remaining questions. 7). Do I miss any other important hardware? Are there tutorials on how ...
by liletian.us
Sun Sep 08, 2019 6:44 am
Forum: Bare metal, Assembly language
Topic: some basic raspberry pi questions related to chadderz121 tutorials
Replies: 5
Views: 1440

Re: some basic raspberry pi questions related to chadderz121 tutorials

Hi Schnoogle Thank you very much for the info. It is extremely helpful! How about rest of questions? BTW, how do you get the FPU bring code? Thanks, Brian Hi there, well that's a whole bunch of questions. let me pick some of them and allow me to answer them as good as I can. 1) Is the CPU in hypervi...
by liletian.us
Sat Aug 31, 2019 3:32 am
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

Re: where is the definition of HidUsageAttach for Chadderz121 cusd code?

Hi trejan Thank you very much! I got it now. Have a good weekend! Best regards, Brian but the KeyboardAttach function needs two parameters which was not given in the code. HidUsageAttach[DesktopKeyboard]=KeyboardAttach; They're storing the function pointer for KeyboardAttach into HidUsageAttach[6]. ...
by liletian.us
Sat Aug 31, 2019 3:31 am
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

Re: where is the definition of HidUsageAttach for Chadderz121 cusd code?

Hi LdB

Thank you so much, I got it.

My understanding is the code has lots of structs (classes in C++) which make a lot of sense.

Thanks,

Brian
LdB wrote:
Fri Aug 30, 2019 6:34 pm
What trejan said.

Review function pointer use
https://www.learn-c.org/en/Function_Pointers
by liletian.us
Fri Aug 30, 2019 3:34 pm
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

Re: where is the definition of HidUsageAttach for Chadderz121 cusd code?

Hi LdB Thanks you so mucn for the reply. but the KeyboardAttach function needs two parameters which was not given in the code. HidUsageAttach[DesktopKeyboard]=KeyboardAttach; Does it need to specific the usbdevice and interface? Result KeyboardAttach(struct UsbDevice *device, u32 interface) { Also, ...
by liletian.us
Thu Aug 29, 2019 9:15 pm
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

Re: where is the definition of HidUsageAttach for Chadderz121 cusd code?

Hi trejan The only line I saw in hid.c is as below. Result (*HidUsageAttach[HidUsageAttachCount])(struct UsbDevice *device, u32 interfaceNumber); There is no body definition of the *HidUsageAttach[HidUsageAttachCount]? I am very confused here, does it need function definition? In the keyboard.c the ...
by liletian.us
Thu Aug 29, 2019 7:14 pm
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

Re: where is the definition of HidUsageAttach for Chadderz121 cusd code?

Hi trejan Thank you so much for the explanation. What do you mean the copied code is missing the array index? Which array index? Also, how to clear the keyboardAddresses + keyboards arrays? It was copied from https://github.com/Chadderz121/csud/blob/master/source/device/hid/keyboard.c THank you so m...
by liletian.us
Thu Aug 29, 2019 6:42 pm
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

Re: where is the definition of HidUsageAttach for Chadderz121 cusd code?

Let me check. Then what does this code mean? Thanks, Brian void KbdLoad() { LOG_DEBUG("CSUD: Keyboard driver version 0.1\n"); keyboardCount = 0; for (u32 i = 0; i < KeyboardMaxKeyboards; i++) { keyboardAddresses = 0; keyboards = NULL; } HidUsageAttach[DesktopKeyboard] = KeyboardAttach; } HidUsageAtt...
by liletian.us
Thu Aug 29, 2019 6:04 pm
Forum: Bare metal, Assembly language
Topic: where is the definition of HidUsageAttach for Chadderz121 cusd code?
Replies: 12
Views: 1370

where is the definition of HidUsageAttach for Chadderz121 cusd code?

Hi All I am looking at Chadderz121 cusd code, however, I can not find the definition of HidUsageAttach function in all the code in the link https://github.com/Chadderz121/csud/. the function body can not be found. Do I miss anything? Can anyone help? Thanks, Brian Result HidAttach(struct UsbDevice *...
by liletian.us
Wed Aug 28, 2019 3:43 am
Forum: Bare metal, Assembly language
Topic: what does this code mean?
Replies: 6
Views: 1022

what does this code mean?

Hi All I seem to have trouble to understand this code. This is the part of the code for USB drive. Result PowerOnUsb() { volatile u32* mailbox; u32 result; mailbox = (u32*)0x2000B880; // this is the baseaddress for the mailbox while (mailbox[6] & 0x80000000); // is this register write? mailbox[8] = ...
by liletian.us
Sat Aug 24, 2019 4:47 am
Forum: Bare metal, Assembly language
Topic: CSUD - Chadderz's Simple USB Driver (Source)
Replies: 73
Views: 24198

Re: CSUD - Chadderz's Simple USB Driver (Source)

Hi LdB Thanks for the help. It is a really old stuff, I only wish I can get a working tutorial. :) Thank you very much for your help. nothing come out from the screen. I can not attached the pic, The screen shows Welcome to Alex's OS - Everyone's favorite OS > p p is the letter that I type in. :( BT...

Go to advanced search