'embeded/Cortex-M7 STM'에 해당되는 글 34건

  1. 2026.02.03 stm32f7 dual bank flash
  2. 2026.02.03 stm32f746g-disco with semtech sx1276 and lvgl
  3. 2024.10.10 modbus rtu coil read
  4. 2024.10.08 stm32 __weak
  5. 2024.09.26 stm32 modbus
  6. 2024.09.11 SPI NSS, NSSP mode
  7. 2024.09.06 FDE CIE
  8. 2024.09.06 code alignement factor?
  9. 2024.09.06 DEBUG_JTRST
  10. 2024.09.04 STM32H757 전원 설정
embeded/Cortex-M7 STM2026. 2. 3. 18:19

페이지라고 해야하나.. 아무튼 섹터별로 용량이 균등하지 않은 녀석도 있다.

 

그리고 듀얼 뱅크와 싱글 뱅크의 경우 일종의 raid 0 처럼 분할해서 striping 되어 저장된다.

[링크 : https://www.st.com/resource/en/application_note/an4826-stm32f7-series-flash-memory-dual-bank-mode-stmicroelectronics.pdf]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

stm32f746g-disco with semtech sx1276 and lvgl  (0) 2026.02.03
modbus rtu coil read  (0) 2024.10.10
stm32 __weak  (0) 2024.10.08
stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
Posted by 구차니
embeded/Cortex-M7 STM2026. 2. 3. 12:31

액정은 큰 거 치고는 해상도가 낮다.

그래도 PSP 해상도라고(!) 130,560 pixel 이고 320x240의 76,800 pixel 에 비하면 거의 2배에 가까운 나름(!) 고해상도다.

  • STM32F746NGH6 Arm® Cortex® core-based microcontroller with 1 Mbyte of Flash memory and 340 Kbytes of RAM, in BGA216 package
  • 4.3” RGB 480×272 color LCD-TFT with capacitive touch screen
  • Ethernet compliant with IEEE-802.3-2002
  • USB OTG HS
  • USB OTG FS
  • SAI audio codec
  • Two ST-MEMS digital microphones
  • 128-Mbit Quad-SPI Flash memory
  • 128-Mbit SDRAM (64 Mbits accessible)

[링크 : https://www.st.com/en/evaluation-tools/32f746gdiscovery.html]

 

이건 또 어떻게 살리냐..

[링크 : https://www.semtech.com/products/wireless-rf/lora-connect/sx1276mb1las]

 

일단 이거부터 빌드해서 넣어보자!

[링크 : https://github.com/lvgl/lv_port_stm32f746_disco]

 

응~ 에러

라는데 웃긴건 elf 파일이 생성되어 있다.

arm-none-eabi-gcc -o "lv_port_stm32f746_disco.elf" @"objects.list"   -mcpu=cortex-m7 -T"/home/falinux/work/src/lv_port_stm32f746_disco/LinkerScript.ld" --specs=nosys.specs -Wl,-Map="lv_port_stm32f746_disco.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
/opt/st/stm32cubeide_1.16.0/plugins/cohttp://m.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.0.200.202406132123/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: warning: /opt/st/stm32cubeide_1.16.0/plugins/cohttp://m.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.0.200.202406132123/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v7e-m+fp/hard/crtn.o: missing .note.GNU-stack section implies executable stack
/opt/st/stm32cubeide_1.16.0/plugins/cohttp://m.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.0.200.202406132123/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/opt/st/stm32cubeide_1.16.0/plugins/cohttp://m.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.0.200.202406132123/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: warning: lv_port_stm32f746_disco.elf has a LOAD segment with RWX permissions
Finished building target: lv_port_stm32f746_disco.elf
 
arm-none-eabi-size  lv_port_stm32f746_disco.elf 
   text    data     bss     dec     hex filename
 617604    1064  204368  823036   c8efc lv_port_stm32f746_disco.elf
Finished building: default.size.stdout
arm-none-eabi-objdump -h -S lv_port_stm32f746_disco.elf  > "lv_port_stm32f746_disco.list"
 
arm-none-eabi-objcopy  -O binary lv_port_stm32f746_disco.elf  "lv_port_stm32f746_disco.bin"
Finished building: lv_port_stm32f746_disco.bin
 
Finished building: lv_port_stm32f746_disco.list
 

12:38:35 Build Failed. 1 errors, 2 warnings. (took 53s.960ms)

 

cortex-m7 이라 기대했는데 해상도 때문인가 느리다?!

 

 

'embeded > Cortex-M7 STM' 카테고리의 다른 글

stm32f7 dual bank flash  (0) 2026.02.03
modbus rtu coil read  (0) 2024.10.10
stm32 __weak  (0) 2024.10.08
stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
Posted by 구차니
embeded/Cortex-M7 STM2024. 10. 10. 12:38

modbus poll 에서 뜬금없이 crc error로 띄워서 헤맸는데

 

03이나 04 명령어 처럼 multiple byte의 경우에는 아래의 형태로 구성되는데

station_id / cmd / length / data(word) / crc 

 

01의 경우는 아래의 형태로 고정된다.

station_id / cmd / length / data(byte) / crc

 

그러다 보니 modbud poll 에서도 고정된 length에서 하드코딩될수 밖에 없고

0x01 0x01 0x02 0x00 0x00 L_CRC M_CRC 로 응답하면

CRC 부분을 보고 읽는게 아니라

0x00 L_CRC 두개를 CRC로 해석하니 mismatch로 잘못 에러를 출력한다.

 

 

어우.. 별거 아닌데 하루를 날리게 하다니..

'embeded > Cortex-M7 STM' 카테고리의 다른 글

stm32f7 dual bank flash  (0) 2026.02.03
stm32f746g-disco with semtech sx1276 and lvgl  (0) 2026.02.03
stm32 __weak  (0) 2024.10.08
stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
Posted by 구차니
embeded/Cortex-M7 STM2024. 10. 8. 10:27

인터럽트 핸들러의 경우 __WEAK가 앞에 붙어있는데

c 언어라면 동일한 함수명은 사용이 불가능한게 상식인데

새로 정의하면 새로 정의된 함수가 사용되고 기존에 정의된 함수는 사용되지 않는 신기한 녀석이다

그래서 이 기회에서 찾아보는 중

 

cmsis_armcc.h 에서 아래와 같이 정의되어 있다.

#ifndef   __WEAK
  #define __WEAK                                 __attribute__((weak))
#endif

 

링크 시간에 strong symbol은 weak symbol을 override 한다. 라고 되어있는데

컴파일러가 아니라 링커가 연결해주는거라니 신기하다.

__attribute__((weak)) variable attribute
Generates a weak symbol for a variable, rather than the default symbol.

Syntax

__attribute__((weak)) <type> <variable>;
Parameters
None.

Operation
At link time, strong symbols override weak symbols. This attribute replaces a weak symbol with a strong symbol, by choosing a particular combination of object files to link.

Example

__attribute__((weak)) int foo;

[링크 : https://developer.arm.com/documentation/101754/0622/armclang-Reference/Compiler-specific-Function--Variable--and-Type-Attributes/--attribute----weak---variable-attribute]

 

[링크 : https://blog.naver.com/22wowow22/220825653093]

[링크 : https://gangsanilee.tistory.com/2874]

[링크 : https://tigershin-shinhyeonkyu.tistory.com/8]

[링크 : https://engineering-agit.tistory.com/25]

 

 

'embeded > Cortex-M7 STM' 카테고리의 다른 글

stm32f746g-disco with semtech sx1276 and lvgl  (0) 2026.02.03
modbus rtu coil read  (0) 2024.10.10
stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
FDE CIE  (0) 2024.09.06
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 26. 16:56

'embeded > Cortex-M7 STM' 카테고리의 다른 글

modbus rtu coil read  (0) 2024.10.10
stm32 __weak  (0) 2024.10.08
SPI NSS, NSSP mode  (0) 2024.09.11
FDE CIE  (0) 2024.09.06
code alignement factor?  (0) 2024.09.06
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 11. 15:15

대충(?) 찾아봐도 약어가 안나오는데

NSSP mode는 NSS Pulse mode 인 것 같고

All SPI interfaces support NSS pulse mode, (STM32H757xI 데이터시트 발췌)

[링크 : https://www.digikey.kr/en/maker/projects/getting-started-with-stm32-how-to-use-spi/09eab3dfe74c4d0391aaaa99b0a8ee17]

 

NSS는 Negative Slave Select가 아닐까 추정된다.

SCK : Serial Clock. Alternatives:
SCK, SCLK, CLK, SCL

MOSI : "Master" Out → "Slave" In. Now can be read as "Main" Out "Sub" In, or can use these alternatives:
SIMO, MTSR, SPID - correspond to MOSI on both main and sub devices, connects to each other
SDI, DI, DIN, SI, SDA - on sub-only devices; Various abbreviations for "Serial" "Data" "In". Connects to MOSI (or alternative names) on main
SDO, DO, DOUT, SO - on main-only devices; Various abbreviations for "Serial" "Data" "Out". connects to MOSI (or alternative names) on sub
COPI, PICO for "peripheral and controller",[36][37] or COTI for "controller" and "target"[38]

MISO : "Master" In ← "Slave" Out. Now can be read as "Main" In "Sub" Out, or can use these alternatives:
SOMI, MRST, SPIQ - correspond to MISO on both main and sub devices, connects to each other
SDO, DO, DOUT, SO - on sub-only devices; connects to MISO (or alternative names) on main
SDI, DI, DIN, SI - on main-only devices; connects to MISO (or alternative names) on sub
CIPO, POCI,[36][37] or CITO[38]

SS : "Slave" Select (same functionality as Chip Select). Alternatives:
SS, SS, SSEL, NSS, /SS, SS# (sub select)
CS, CS (chip select)
CE (chip enable)

[링크 : https://en.wikipedia.org/wiki/Serial_Peripheral_Interface]

 

SPI 통신은 크게 4개 모드가 있는데

Clock Polarity 와 Clock Phase의 조합으로 총 4가지가 존재한다.

[링크 : https://en.wikipedia.org/wiki/Serial_Peripheral_Interface]

[링크 : https://igotit.tistory.com/entry/SPI-mode-4%EC%A2%85-CPOL-CPHA]

 

STM32CubeIDE 에서는

CPOL은 high, low,

CPHA는 1edge , 2edge로 명명되는데

 

ST32H757xI 메뉴얼에서는 아래와 같이 그려주고 있고

MOSI가 먼저 가면 MISO가 응답오는 식으로 반응하고

읽는 타이밍은 CPHA / CPOL의 폴링 혹은 라이징 엣지에서 읽게 되는데, 앞의 엣지, 뒤의 엣지 식으로 표현되기도 하낟.

 

 

CPHA가 lsb로 생각하면 외우기가 좀 쉬우려나?

[링크 : https://igotit.tistory.com/entry/SPI-mode-4종-CPOL-CPHA]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

stm32 __weak  (0) 2024.10.08
stm32 modbus  (0) 2024.09.26
FDE CIE  (0) 2024.09.06
code alignement factor?  (0) 2024.09.06
DEBUG_JTRST  (0) 2024.09.06
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 6. 18:21

디버깅 관련 정보가 들어있는 곳이라는데

NUCLEO-G474RE\Exe\Project.axf: Warning: L6775W: stl_sch_main.o(.debug_frame) has FDEs which use CIEs which are not in this section.

 

"이 섹션에 존재하지 않는 CIEs를 사용하는 FDEs가 section name에 존재한다." 라고 해석하면 맞나?

L6775W:<objname>(<secname>) has FDEs which use CIEs which are not in this section.

[링크 : https://developer.arm.com/documentation/100074/0613/linker-errors-and-warnings/list-of-the-armlink-error-and-warning-messages]

 

CIE 는 모든 익셉션 핸들러들이 공통적으로실행하게되는 초반의 바이트코드들을 의미하고
FDE 는 익셉션이 발생한 위치별로 catch 로 가기위해 복구해야하는스택프레임이 달라지는부분이 반영되는 코드들이다.

[링크 : https://daehee87.tistory.com/468]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
code alignement factor?  (0) 2024.09.06
DEBUG_JTRST  (0) 2024.09.06
STM32H757 전원 설정  (0) 2024.09.04
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 6. 18:18

keil 에서 빌드했더니 왜 1이 나온게 있지?

00000208 0000000c ffffffff CIE
  Version:               1
  Augmentation:          ""
  Code alignment factor: 2
  Data alignment factor: -4
  Return address column: 14

 

 

[링크 : https://community.st.com/t5/stm32-mcus-products/code-alignment-questions/td-p/63653]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

SPI NSS, NSSP mode  (0) 2024.09.11
FDE CIE  (0) 2024.09.06
DEBUG_JTRST  (0) 2024.09.06
STM32H757 전원 설정  (0) 2024.09.04
STM32 / no MCU device found  (0) 2024.09.04
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 6. 12:43

NRST랑 머가 다른가 해서 찾아봤더니

NJTRST 는 JTAG 부분만 리셋을 한다고

[링크 : https://community.st.com/t5/stm32-mcus-products/jtrst-and-nrst-of-stm32-mcu/td-p/627177]

 

왼쪽은 JTAG, 오른쪽은 SWD

RESET은 MCU 전체 리셋이고 JTAG 에만 nTRST가 존재한다.

 

[링크 : https://www.segger.com/products/debug-probes/j-link/technology/interface-description/]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

FDE CIE  (0) 2024.09.06
code alignement factor?  (0) 2024.09.06
STM32H757 전원 설정  (0) 2024.09.04
STM32 / no MCU device found  (0) 2024.09.04
STM32CubeIDE alt func  (0) 2024.09.03
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 4. 21:56

아니 무슨.. STM32F 시리즈에서는 이런거 본적도 없는데, 전원 옵션이 존재해?

입력이야 PCB 설계쪽에서 할일이긴 한데

 

cubeide 에서 보다보니 RCC에서 power parameters

PW_LDO_SUPPLY 등이 존재하길래 왜(?) 이런거 까지 sw에서 설정해야 하는게 멘붕중

 

 

[링크 : https://www.st.com/resource/en/application_note/an5307-getting-started-with-stm32h7a37b3-line-and-stm32h7b0-value-line-microcontroller-hardware-development-stmicroelectronics.pdf]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

code alignement factor?  (0) 2024.09.06
DEBUG_JTRST  (0) 2024.09.06
STM32 / no MCU device found  (0) 2024.09.04
STM32CubeIDE alt func  (0) 2024.09.03
stm32h757i-eval 데모 펌웨어 굽기  (0) 2024.08.07
Posted by 구차니