Stm32f notes sections 3p1 a 3p4

From Wiki at Neela Nurseries
Revision as of 15:58, 12 June 2018 by Ted (talk | contribs) (2018-06-13 - Tuesday, Ted moving early STM32F notes from the LPCXpresso article on Neela Nurseries wiki.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

^ STMicro standard peripheral libraries

☆ * * NEED TO MOVE THIS STM32F DOC SECTION TO STM32F100 NOTES PAGE ON WIKI * * *

A search at st.com for the header file stm32f10x.h results in two app notes type documents from ST.

  • STSW-STM32020 . . . i2c driver demo for stm32F1xxx and other micros,


Side note: linker files such as ~/Downloads/stm/an3268/stm32vldiscovery_package/Project/Demo/TrueSTUDIO/DISCOVER/STM32F100RB_FLASH.ld describe among other things the memory types, starting addresses and ranges of ST microcontrollers, and probably other manufacturers' microcontrollers too.


^ Crafting makefile for SCD30 demo

GNU make define directive:

Also good to know are GNU `make` functions $(error ...) $(warning ...) and $(info ...):

Detailed logging of compilation, as in `$ make all install 2>&1 | tee make.log` . . . :


^ NOP function and to implement microsecond delays

What we're really looking for here is micro-second accurate delay function . . .

/opt/lib/an3268/stm32vldiscovery_package/Project/Examples/SysTick$ ls -l
total 40
drwxr-xr-x 2 veris veris 4096 Oct 18  2010 EWARMv5
drwxr-xr-x 2 veris veris 4096 Oct 18  2010 MDK-ARM
drwxr-xr-x 4 veris veris 4096 Oct 18  2010 TrueSTUDIO
-rw-r--r-- 1 veris veris 3810 Sep 13  2010 main.c
-rw-r--r-- 1 veris veris 1626 Sep 13  2010 main.h
-rw-r--r-- 1 veris veris 2375 Sep 13  2010 readme.txt      <-- check this file, refers to implementing one microsecond delay based on 24MHz clock
-rw-r--r-- 1 veris veris 3228 Sep 13  2010 stm32f10x_conf.h
-rw-r--r-- 1 veris veris 4346 Sep 13  2010 stm32f10x_it.c
-rw-r--r-- 1 veris veris 1888 Sep 13  2010 stm32f10x_it.h


- 2018-05-01 Tuesday -

ST documentation on STM32F timers:


^ Build and assembly issues

Getting errors as though assember arm-none-eabi-as doesn't understand project assembly file comment lines, those which begin with ';':

$ make
*** In demo-systick.elf target variable (CC) holds 'arm-none-eabi-gcc',
*** and variable (AS) holds 'arm-none-eabi-as',
arm-none-eabi-gcc -g -O2 -Wall -T/opt/lib/an3268/stm32vldiscovery_package/Project/Examples/SysTick/TrueSTUDIO/stm32_flash.ld -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork -mfloat-abi=soft -I. -I/opt/lib/an3268/stm32vldiscovery_package/Utilities/STM32F4-Discovery -I/opt/lib/an3268/stm32vldiscovery_package/Utilities -I/opt/lib/an3268/stm32vldiscovery_package/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x -I/opt/lib/an3268/stm32vldiscovery_package/Libraries/STM32F4xx_StdPeriph_Driver/inc -I/opt/lib/an3268/stm32vldiscovery_package/Libraries/CMSIS/CM3/CoreSupport main.c stm32f10x_it.c startup_stm32f10x_md_vl.s -o demo-systick.elf

startup_stm32f10x_md_vl.s: Assembler messages:
startup_stm32f10x_md_vl.s:1: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_md_vl.s:2: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_md_vl.s:3: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_md_vl.s:4: Error: junk at end of line, first unrecognized character is `*'
   .
   .
   .

Reference: https://stackoverflow.com/questions/46106166/assembler-messages-error-junk-when-running-as-on-linux


- 2018-05-02 WED -

Here is an interesting directory in terms of ARM target libraries, and seeming mention of linker scripts:

   $ pwd

   /usr/lib/arm-none-eabi

   $ ls

   bin  include  ldscripts  lib  newlib