❌

Normal view

There are new articles available, click to refresh the page.
Today β€” 4 July 2025Main stream

Learning Baremetal Programming in Cortex M4 (STM32 F4) - 1

17 September 2024 at 00:00

I am following this Baremetal Programming Series (Low Byte Productions Channel), inorder to learn about ARM microcontrollers, writing drivers (I've a goal to write a driver for a Serial Communication Protocol maybe CAN or Q-SPI, etc.) and learning some C constructs as well which I will then emulate in Renode.

Some notes,

  • MACROS{.verbatim} are instructions that asks the C preprocessor to do text replacements.

  • Behind the Scenes of libopencm3{.verbatim}

    • The memory mapped address of a pin is calculated in the pre-processing stage itself using macros.
  • SYS_TICK{.verbatim} is like a Wall Clock.

  • weak functions{.verbatim} are functions whose implementation can be redefined.

For Renode implementation, I just loaded the ELF of program used in the episode as like for the Hello World, Intro to Renode from Interrupt and I did used the same Makefiles and Linker scripts once again. (Those 2 seems to be a huge mess ? Is it ?)

I shouldn't be lazy enough to tinker them in future.

Then Looked the state of Pin A5 (External LED) and I could see that the state toggles. I think I could even log the data or check this working using Robot Framework.

Next, I need to look at Renode docs to discover more functionalities and then continue with Episode 3 on PWM and Timers!

Before yesterdayMain stream

python program Lists

28 August 2024 at 01:38

mylist create

mylist=["singam","goat","rayyan","leo"]
print(mylist)
print(mylist[2])
mylist[1]="mersal"
print(mylist)
mylist=["singam","goat","raayan"]
mylist.append("mersal")
print(mylist)
mylist=["singam","goat","raayan"]
mylist.insert(1,"Mersal")
print(mylist)
mylist=["singam","goat","rayaan","mersal"]
mylist.remove("singam")
print(mylist)
mylist=["singam","goat","rayaan","mersal"]
for x in mylist:
print(x)
mylist=["singam","goat","rayaan","mersal"]
mylist.sort()
print(mylist)
mylist=["singam","goat","rayaan","mersal"]
mylist.pop()
print(mylist)
o/p
['singam', 'goat', 'rayyan', 'leo']
rayyan
['singam', 'mersal', 'rayyan', 'leo']
['singam', 'goat', 'raayan', 'mersal']
['singam', 'Mersal', 'goat', 'raayan']
['goat', 'rayaan', 'mersal']
singam
goat
rayaan
mersal
['goat', 'mersal', 'rayaan', 'singam']
['singam', 'goat', 'rayaan']

❌
❌