Using LEDs As Precise GPIOs
23:42
4 ай бұрын
Turning Pixels Into Waves
59:07
7 ай бұрын
Programmatic Painting: Flow Fields
1:02:03
Bare Metal Programming Series 0
25:06
Hiding Data In Sound
50:17
Жыл бұрын
Пікірлер
@rolandzfolyfe8360
@rolandzfolyfe8360 17 сағат бұрын
5:56 Better late than never but multiplication actually does work the same for unsigned and two's complement signed integers, as long as you truncate the result to the same number of bits as the inputs. This is why, for example, the ARM mul instruction is used for both. This makes sense when you remember that multiplies basically dissolve into adds and left shifts in both software and hardware implementations, and neither of them care about signedness.
@harinayan7879
@harinayan7879 18 сағат бұрын
Is the index.ts file supposed to synchronise with the receiver first? When i run the code without any breakpoints, it builds packets after receiving a random number of packets. How can i fix this?
@TimTrostmann-zd4oj
@TimTrostmann-zd4oj 19 сағат бұрын
This is really informative... I am currently taking a course in operating systems engineering and feel completely lost, I finally feel like I can actually understand what is going on! Thank you
@oguzhankarahan1737
@oguzhankarahan1737 21 сағат бұрын
How Does An Operating Boot? - 50 minutes... Thank you. I'll just ask this ChatGPT or Bard. Lol
@LowByteProductions
@LowByteProductions 20 сағат бұрын
Man this is a cringe comment if I ever saw one
@oguzhankarahan1737
@oguzhankarahan1737 17 сағат бұрын
@@LowByteProductions Hey! Do not take this seriously. I was only teasing you. Sorry if it's offensive. Your video is so good and well-detailed. Keep up the good work!
@avinashverma3973
@avinashverma3973 2 күн бұрын
awesome video
@Chabdi111
@Chabdi111 2 күн бұрын
Awsome work, i hope u do more videos that i can learn fron :)
@harinayan7879
@harinayan7879 3 күн бұрын
Putty and screen show no output My code compiles and runs the LED blinks as expected. But when i use putty, it says that unable to connect to the /dev/ttyUSB0 and then closes. when i use screen without sudo, it says screen is terminating. When i use screen with cudo, it simply opens the terminal and i get no response from the device. The USB adapter is connected and is being detected by the "dmesg | grep tty* ". The same problem persists even on windows, where the terminal is open on putty, but when i type something, no data gets displayed. I am using a f4 discovery board and have made all the necessary changes in the code, makefile and the linkerscript. did anyone else face the same issue? edit: found a work around for now: After some testing i figured out that the issue is with my USB to UART converter. I am using a CH340 module as shown in the video and it is being recognized by both Linux and Windows as ttyUSB0 or COM3, but when i try to access it using either putty or screen, i get no data. However, i have a F411 nucleo board lying around and it's integrated st-link works directly without any external module. I am able to send and receive data as expected. I tried the CH340 with both F411 Nucleo and F407 discovery, and in both cases, it deoesn't work. Later, I will use an oscilloscope to look into the TX and RX lines of the Discovery board and the CH340 module and try to findout if the module is broken. I think it might be a driver issue but i am not yet sure. But for now, the Integrated St-link of the F411 Nucleo works wothout any external module needed on Linux. If someone finds a solution to the problem, then please let me know.
@PeterBagel-ti5xw
@PeterBagel-ti5xw 4 күн бұрын
Oh my god, I just found out about this this channel it's absolutely AWESOME! I love it I'm watching all your videos now
@SeanHarding-nv9li
@SeanHarding-nv9li 4 күн бұрын
I found an easier way to get to `d`: using `undefined`. Attempting to access a part of an array or object that doesn't exist, will NOT throw an error, but rather, return undefined. The simplest way to do this is `[][[]+[]]` (the function `` of the Array object). Then casting to a string and returning the character with index 2; i.e. `([]+[][[]+[]])[+!![] + +!![]]`; yields the character `d`. Additionally, there is a better way to convert the numbers: using your ORIGINAL example of type coercion: The expression `+!![] + !![]` evaluates to `1 + true`, or 2. This can be written in the form `+!![] +!![]` (two copies of `+!![]` back-to-back), so it's easy to extrapolate; for example, 7 becomes `+!![] +!![] +!![] +!![] +!![] +!![] +!![]`. (NOTE: I like to write the number 1 as `+!+[]` instead of `+!![]`, which reads `+! 0` instead of `+! false`.)
@Unique-Concepts
@Unique-Concepts 4 күн бұрын
I love your videos. Thank you 😊👍👍
@PinkoLP
@PinkoLP 12 күн бұрын
malloc also uses this type of unstructured memory access like this kalloc function (so even for userspace we don't use more structure). We just have a chunk of memory and write an address to the next free chunk in the first few bytes. Also, these chunks can be of variable sizes, so you would even need to insert more implicit structure and markers into the memory locations. (Plus we have several lists, mechanisms to prevent and resolve fragmentation etc.). So if you find this kind of structuring interesting, definitely have a look at the common malloc implementation and other allocators in general.
@MrJegerjeg
@MrJegerjeg 12 күн бұрын
I can imagine that this method leads to memory fragmentation, but is that an issue? Does it affect the process performance at all?
@paritoshmishra0891
@paritoshmishra0891 14 күн бұрын
Somehow the youtube algorithm landed me on this goldmine. great job!
@riccardocazzola-nc4oh
@riccardocazzola-nc4oh 14 күн бұрын
I don't know how to thank you. I just applied for a software embedded developer job and your videos are worthy like water for me
@salilphadnis4147
@salilphadnis4147 14 күн бұрын
Just wonderful. Thank you !
@harinayan7879
@harinayan7879 14 күн бұрын
Core locked up: I am using a STM32 Discovery board with a F407 chip. I am able to flash the code onto the MCU but it is not being executed. Earlier it was working fine with systick but when i powered it on yesterday, the blue led (which i configured to blink) was not blinking. I was using st-flash on CLI for this. I installed STM32CubeProgrammer, which after flashing the code, tells me that the core is locked up. Can someone please guide me on what to do? Edit: i tried flashing the same code onto a nucleo board with f411re and the core immediately locked up as well.
@LowByteProductions
@LowByteProductions 14 күн бұрын
Did you change the makefile to reflect that you're using a different chip? You'll also need to change the linkerscripts to reflect the memory layout of these chips.
@harinayan7879
@harinayan7879 14 күн бұрын
@@LowByteProductions no sir I didn't make any changes in the make file or the linker scripts. I am using a stm32f407 processor so I assumed I need not make any changes. This was working all right upto systick and was working as intended. Later for some reason it didn't work. Also, I am using stlink-tools to flash from the cli. I tried using the STMCubeIDE on windows and this works fine. However this has STM's implementation of HAL and it is on windows not Linux so I don't want to use the IDE. It was working earlier and all of a sudden stopped working. What changes do I have to make in the linker and the makefile sir?
@harinayan7879
@harinayan7879 14 күн бұрын
@@LowByteProductions okay so I tried something. In Linux, I cloned the libopencm3 examples repo and built a blink project. I tried to flash this code onto the processor, flash was successful but didn't execute as core locked up. Then I tried uploading the code using stm cube progmmer, which also locked the core. Then, I mailed myself this file and then in windows, I used the cubeprogrammer to flash the same code onto the processor, which again resulted in a lockout. Then I wrote the same code using stm32 HAL in their official IDE, and it worked. So here are my assumptions and my guess as to what might be the issue: 1) libopemcm3 works for F4 processor 2) this problem is clearly not dependent on the OS as the issue persisits on Linux and windows. 3) It is independent of the flashing tools (stlink-tools) or the the official programmer. 4) HW works as there is no issue running the stm32's official HAL. 5) on Linux, the project is built and the .binary and .elf is made So my guess is that this is mostly a compiler on Linux issue. If I am wrong please correct me and let me know how to proceed sir.
@harinayan7879
@harinayan7879 12 күн бұрын
@@LowByteProductions I fixed it sir. I had installed a software used for programming FPGAs. The software Targeted a ARM cortex processor on the FPGA board and used C as the programming language. When I installed it, it also installed a C compiler for ARM processor on this board that has the exact same name as the one I installed at the beginning of your series here (arm-none-eabi-gcc). Now the problem was that the path to this compiler was put ahead of the /usr/bin in the environment variables. Consequently, when the make file in my project built the project, it used the ARM compiler of the FPGA rather than the ARM complier I installed for the STM32. The executables generated now were for the ARM chip on the FPGA, and when I uploaded it onto the STM32, it incorrectly initialised the clock and other peripherals, causing the core lock up. To fix this I simply changed the path to the complier in the makefile so that it has the path to the correct compiler for the STM32 and everything works properly now.
@LowByteProductions
@LowByteProductions 12 күн бұрын
Awesome, glad you got it sorted!
@mikemorrow4949
@mikemorrow4949 15 күн бұрын
What you say is great. It is easy to follow but the low energy growl in your voice really grates on my nerves and I can't listen to you for very long at a time. I hope you can deliver more energy while speaking and get over the growl. Thanks, either way.
@salilphadnis4147
@salilphadnis4147 16 күн бұрын
Can't thank you enough for this series. This is incredibly useful.
@peterweston6588
@peterweston6588 20 күн бұрын
I found your channel yesterday when I searched for "write a regex parser". Even though I don't use JS myself, I found your back catalog very interesting. Thanks for the great work.
@adityagujaria2598
@adityagujaria2598 20 күн бұрын
Hey love the video!!! Quick question, how is the memory that is alloted to the stack0, in the entry.S ( 4096* NCPU) actually allotted? If the kernel is still not yet started, who manages and allots stack memory? I got into a chicken egg dilemma..
@vanellope9565
@vanellope9565 21 күн бұрын
i ve been learning java script for 3 months now and i wanted to do a new project and thought a 16 bit computer will be interesting enough. upon trying to grasp the logic behind arrayByBuffer and DataView and misserably failing i ve come to the conclusion that i know way less about computers then i thought i do. Maybe someday i ll be ready for this.
@LowByteProductions
@LowByteProductions 21 күн бұрын
Push through! If it was all easy and made sense straight away, you wouldn't be learning, right. Try reading and watching different sources talking about the same ideas. The more you expose yourself to it, the more familiar it will seem, and the less alien. I promise. Things don't all have to make sense at once, but there'll come a point where different pieces will start clicking together. You're ready for it now. Just keep going.
@vanellope9565
@vanellope9565 21 күн бұрын
@@LowByteProductions thank you :) i was doing that now my idea is to make a fetch decode execute loop that counts up that would be easier for the beginning
@rodrigoqteixeira
@rodrigoqteixeira 22 күн бұрын
"javascript is open source"
@rodrigoqteixeira
@rodrigoqteixeira 22 күн бұрын
Bro actually used backspashes to produce back slashes 💀
@rodrigoqteixeira
@rodrigoqteixeira 22 күн бұрын
Why didnt you just "map['\\'] = '\\';"?
@kacperkonieczny7333
@kacperkonieczny7333 21 күн бұрын
I think he needed it as a string
@rodrigoqteixeira
@rodrigoqteixeira 21 күн бұрын
@@kacperkonieczny7333 to concatenate it with the rest of the stribg that is the code? Nope, bro just did something unecessary.
@harinayan7879
@harinayan7879 23 күн бұрын
i am facing issue with running make on the firmware.c file. I get the error make: *** No rule to make target 'firmware.elf', needed by 'elf'. Stop. Someone please help.
@LowByteProductions
@LowByteProductions 21 күн бұрын
Did you clone the repository? Are you on the right commit for this episode?
@harinayan7879
@harinayan7879 21 күн бұрын
@@LowByteProductions yes sir. I cloned it as is, didn't alter any of the makefiles and only removed the additional files and folders to replicate the folder structure that you had in the blinky video. Also the file is named firmware.c in my directory as well. and on the current commit.
@LowByteProductions
@LowByteProductions 21 күн бұрын
Well the makefiles changed a fair bit throughout the series, so it makes sense that it might not work outright. You'll find it easier I think to check out the commit associated with the first episode instead, and try to get that running. From there you'll be able to follow along with the seri3s making your own changes 🙂
@harinayan7879
@harinayan7879 21 күн бұрын
@@LowByteProductions thank you sir i will try that.
@harinayan7879
@harinayan7879 14 күн бұрын
@@LowByteProductions This solution worked sir. Thank you. But now i am facing a different issue in the PWM video related to a core lockup. How may i proceed from here?
@furkanonder-ut4mz
@furkanonder-ut4mz 24 күн бұрын
Good stuff mate!
@VaibhavBhandarigplus
@VaibhavBhandarigplus 24 күн бұрын
when are you doing #6? great content
@MrBogfrog
@MrBogfrog 25 күн бұрын
Excellent.
@dblitroot
@dblitroot 27 күн бұрын
When there are multiple timed operations I prefer to do it this way to avoid constant fetching of the ticks value and math inside every if statement: while(1){ uint64_t tick_now = get_ticks(); if(tick_now > start_tick){ start_tick += 1000; .... } .... }
@andyschneider6402
@andyschneider6402 Ай бұрын
Is it possible that the fact the nop instructions don’t consume time consistently as you add them is because a NOP on ARM is not guaranteed to consume time, the processor is allowed to remove them from the pipeline?
@Knirin
@Knirin Ай бұрын
I am a bit in the latter camp. You can write an assembler, compiler, or CPU in JavaScript. Please don’t run around screaming that it is the best tool for that job. I start getting upset when people go doable in language X means language X is the best possible tool for job Y. If you boil most tasks down enough they turn into finite state machines. That doesn’t mean an FSM is the most productive way of tackling a task. I am finding other videos pretty cool.
@nceban2136
@nceban2136 Ай бұрын
Pdos? Clergy's favourite OS
@Somali-iv9pu
@Somali-iv9pu Ай бұрын
hmmm i guess 5 dislikes were having a very bad day xd. thanks alot sir for sharing you knowledge with us, i cant wait to finish all of it 🙏🙏do you suggest books or certifications!
@yvesbaumes
@yvesbaumes Ай бұрын
Great video! Thank you very much for such high quality content. One question though: The `start` function is written in C. Which means it has a functioning stack somewhere. I guess that is the purpose of `_entry` assembly function to prepare the stack for `start`. How does the c code (or the c compiler) know that the stack must begin at `stack0 + hartid * 4096` for the `start` function?
@dr3dr3-nb9mp
@dr3dr3-nb9mp Ай бұрын
libopencm3 won't compile on window. Error with the nvic.h linker line 63: from the make file. Did anyone have a work around this since the include Header file is dynamic link
@retrojames4226
@retrojames4226 Ай бұрын
No unit tests?
@rajsahu4644
@rajsahu4644 Ай бұрын
❤❤❤❤
@Klio_Ukranian
@Klio_Ukranian Ай бұрын
@TheodorMoroianu
@TheodorMoroianu Ай бұрын
Best *nix series on youtube by far!! I really hope there will be a continuation!
@torcher5023
@torcher5023 Ай бұрын
11:46 just use desmos to illustrate concept lol
@krishnababu5190
@krishnababu5190 Ай бұрын
Generally kalloc(size_t sz) takes the size of memory to allocate, but in this os code why kallaoc(void) suppose if i want to allocate memory for a structure of 25 bytes, I get whole 4096 bytes, Is this inefficient Correct me if I am wrong
@LowByteProductions
@LowByteProductions Ай бұрын
kalloc is a page allocator, so yes it always returns 4096 bytes. You can build a finer grained allocator on top of this mechanism.
@krishnababu5190
@krishnababu5190 Ай бұрын
Ok Thanks. I am comparing this page allocator (kmalloc) API with linux kernel kmalloc API. Thanks for pointing out😊.
@RomanShchekin
@RomanShchekin Ай бұрын
This is simply amazing! Best OS explaining video I've seen so far. Thank you so much and please keep it up!
@krishnababu5190
@krishnababu5190 Ай бұрын
Too Interesting Please continue the series😊
@rayquazaboladao
@rayquazaboladao Ай бұрын
Another way to define a expression is as: expr: term ("*" term)* term: factor (("+"|'-") factor)* factor: literal | variable | "(" expr ")"
@12rjig13gb
@12rjig13gb Ай бұрын
in the uart_usr, shouldn't the if statement check for !overrun ?
@Georetic
@Georetic Ай бұрын
nice video
@jamalal7357
@jamalal7357 Ай бұрын
I guess how do you know what is needed to boot the kernel and all the steps required for the architecture? Is there a manual that describes all of that?
@w6wdh
@w6wdh Ай бұрын
24:55 Question: initlock() is passed a pointer to a string (“cons” for example) with type (char *) to retain that information for debugging. But that points to a string in the caller’s data. Can you be sure that the string persists? If it is ephemeral, the pointer would no longer be valid. Do you have to do anything in the code calling initlock() to ensure that the string can always be accessed with the original pointer value? (And yes, this series of videos is amazing. Instant subscription. I’m retired so I no longer write code for embedded CPUs, but your explanations are a delight to follow.)
@SumitAdep
@SumitAdep Ай бұрын
well explained
@dengdaley
@dengdaley Ай бұрын
excellent tutors! could you share your vscode experience for another video?