All Projects → eldarkg → Emdr1986x Std Per Lib

eldarkg / Emdr1986x Std Per Lib

Milandr MCU 1986x Standard Peripherals Library. Mirror:

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Emdr1986x Std Per Lib

Emma
Emma Memory and Mapfile Analyser
Stars: ✭ 21 (-43.24%)
Mutual labels:  gcc, mcu
Pdp10 Gcc
PDP-10 backend for GCC 3.2
Stars: ✭ 7 (-81.08%)
Mutual labels:  gcc
Zephyr
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
Stars: ✭ 5,335 (+14318.92%)
Mutual labels:  mcu
Lvgl
Powerful and easy-to-use embedded GUI library with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
Stars: ✭ 8,172 (+21986.49%)
Mutual labels:  mcu
Embedded Notes
嵌入式linux软件开发、嵌入式linux驱动开发、c语言、单片机开发、IOT开发等面试要点记录
Stars: ✭ 487 (+1216.22%)
Mutual labels:  mcu
Croaring
Roaring bitmaps in C (and C++)
Stars: ✭ 735 (+1886.49%)
Mutual labels:  gcc
Node Minify
Light Node.js module that compress javascript, css and html files
Stars: ✭ 404 (+991.89%)
Mutual labels:  gcc
Stc15clock
replacement software for cheap chinese DIY led clock based on STC15W404AS MCU
Stars: ✭ 13 (-64.86%)
Mutual labels:  mcu
Beelzebub
The Lord of Flies - A hobby operating system
Stars: ✭ 24 (-35.14%)
Mutual labels:  gcc
Guilite
✔️The smallest header-only GUI library(4 KLOC) for all platforms
Stars: ✭ 5,841 (+15686.49%)
Mutual labels:  mcu
Incubator Nuttx
Apache NuttX is a mature, real-time embedded operating system (RTOS)
Stars: ✭ 591 (+1497.3%)
Mutual labels:  mcu
Stm32 Bootloader
Customizable Bootloader for STM32 microcontrollers. This example demonstrates how to perform in-application-programming of a firmware located on an external SD card with FAT32 file system.
Stars: ✭ 541 (+1362.16%)
Mutual labels:  mcu
Gccrs
GCC Front-End for Rust
Stars: ✭ 875 (+2264.86%)
Mutual labels:  gcc
Gcovr
generate code coverage reports with gcc/gcov
Stars: ✭ 482 (+1202.7%)
Mutual labels:  gcc
Airmonitor
Air quality monitor based on STM32 & MT7681
Stars: ✭ 10 (-72.97%)
Mutual labels:  mcu
Guilitesamples
✨Small interesting GUI effects could be reused everywhere
Stars: ✭ 409 (+1005.41%)
Mutual labels:  mcu
Embox
Modular and configurable OS for embedded applications
Stars: ✭ 576 (+1456.76%)
Mutual labels:  mcu
Musl Cross Make
Simple makefile-based build for musl cross compiler
Stars: ✭ 646 (+1645.95%)
Mutual labels:  gcc
Dev Cpp
A fast, portable, simple, and free C/C++ IDE
Stars: ✭ 940 (+2440.54%)
Mutual labels:  gcc
Sgdk
SGDK - A free and open development kit for the Sega Mega Drive
Stars: ✭ 868 (+2245.95%)
Mutual labels:  gcc

emdr1986x-std-per-lib

Milandr MCU 1986x Standard Peripherals Library

This isn't official library that compatible with GCC compiler.

The following MCU's are now supported by gcc:

  • MDR1901VC1T (not tested)
  • MDR1986VE1T
  • MDR1986VE3 (not tested)
  • MDR1986BE4 (not tested)
  • MDR1986VE9x

>>>Link to documentation<<<

>>>Link to a recomended GCC compiler version<<<

>>>Link to newest CMSIS<<< (The current package contain an old version of CMSIS)

To see examples for using gcc toolchain look at /usr/share/gcc-arm-embedded/samples (on Linux).

Usage (pseudocode)

INC = inc
      std-per-lib/CMSIS/CM3/CoreSupport
      std-per-lib/CMSIS/CM3/DeviceSupport/MDR32F9Qx/inc
      std-per-lib/CMSIS/CM3/DeviceSupport/MDR32F9Qx/startup
      std-per-lib/MDR32F9Qx_StdPeriph_Driver/inc
      std-per-lib/MDR32F9Qx_StdPeriph_Driver/inc/USB_Library
SRC = example.c
      std-per-lib/CMSIS/CM3/DeviceSupport/MDR32F9Qx/startup/gcc/startup_MDR32F9Qx.S
      std-per-lib/CMSIS/CM3/DeviceSupport/MDR32F9Qx/startup/system_MDR32F9Qx.c
      std-per-lib/MDR32F9Qx_StdPeriph_Driver/src/MDR32F9Qx_port.c
      # another peripheral modules

Release

CFLAGS = -mcpu=cortex-m3 -mthumb -O2 -ffunction-sections -fdata-sections -Wall -Wextra -Wshadow -Wredundant-decls -Wno-missing-field-initializers -Wconversion -Wno-packed-bitfield-compat -pipe
C

For each src in SRC list call:

arm-none-eabi-gcc ${CFLAGS} -DUSE_MDR1986VE9x -D__STARTUP_CLEAR_BSS -D__START=main -I${INC} -c ${src} -o ${src}.o

Link (OBJ it is a list of all ${src}.o):

arm-none-eabi-gcc ${CFLAGS} -T std-per-lib/CMSIS/CM3/DeviceSupport/MDR32F9Qx/startup/gcc/MDR32F9Qx.ld --specs=nosys.specs -Wl,--gc-sections -ffreestanding -nostartfiles -Wl,-Map=example.map ${OBJ} -o example.elf
C++

For each src in SRC call:

arm-none-eabi-g++ ${CFLAGS} -fno-rtti -fno-exceptions -fno-threadsafe-statics -DUSE_MDR1986VE9x -D__STARTUP_CLEAR_BSS -I${INC} -c ${src} -o ${src}.o

Link:

arm-none-eabi-g++ ${CFLAGS} -T std-per-lib/CMSIS/CM3/DeviceSupport/MDR32F9Qx/startup/gcc/MDR32F9Qx.ld --specs=nosys.specs --specs=nano.specs -Wl,--gc-sections -ffreestanding  -Wl,-Map=example.map ${OBJ} -o example.elf

Selection a type of C/C++ standard library:

--specs=nano.specs - use newlib-nano library (recomended for embedded systems). Without this flag - used the common library.

With semihosting: --specs=rdimon.specs

Without semihosting: --specs=nosys.specs

>>>What is semihosting?<<<

Show compiled file sections size after building (additional linker flag): -Wl,--print-memory-usage.

Example:

Memory region         Used Size  Region Size  %age Used
           FLASH:     29760 B       128 KB     22.71%
           RAM:        2312 B        32 KB      7.06%

Get a hex file:

arm-none-eabi-objcopy -O ihex example.elf example.hex

Get a bin file:

arm-none-eabi-objcopy -O binary example.elf example.bin

Debug

Instead cflag -O2 set -O0 -ggdb3.

Select MCU architecture

Instead cflag -mcpu=cortex-m3 use:

-mcpu=cortex-m0     # MDR1986BE4
-mcpu=cortex-m1     # MDR1986VE1T, MDR1986VE3
-mcpu=cortex-m3     # MDR1986VE9x, MDR1901VC1T

Instead compiler definition -DUSE_MDR1986VE9x use:

-DUSE_MDR1901VC1T   # MDR1901VC1T
-DUSE_MDR1986VE1T   # MDR1986VE1T
-DUSE_MDR1986VE3    # MDR1986VE3
-DUSE_MDR1986BE4    # MDR1986BE4
-DUSE_MDR1986VE9x   # MDR1986VE9x

INC, SRC and ld script change in accordance selected MCU.

Comment for pseudocode

  • instead ${VAR} paste relevant VAR list
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].