블로그 이미지
안녕1999

카테고리

전체 (3067)
자바스크립트 (20)
안드로이드 (14)
WebGL (4)
변비 (17)
정치,경제 (35)
C언어,ARM (162)
컴퓨터(PC, Note Book, 윈.. (41)
전자회로, PCB (27)
유머,안웃긴,GIF,동영상 (118)
국부론60 (71)
모듈(PCB) (3)
건강 (2)
FreeCAD (25)
PADS (43)
퇴직,퇴사,구직,취업 활동 (3)
C# (86)
엑셀 (8)
워드 (0)
LabView (6)
레고 (30)
FPGA (0)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글


/*
*****************************************************************************
**
**  File        : stm32_flash.ld
**
**  Abstract    : Linker script for STM32F207 Device with
**                1MByte FLASH, 128KByte SRAM
**
**                Set heap size, stack size and stack location according
**                to application requirements.
**
**                Set memory bank area and size if external memory is used.
**
**  Target      : STMicroelectronics STM32
**
**  Environment : Eclipse with CDT plugin and GCC compiler from CodeSourcery
**
**			 Author           Date        Comment
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** 		    T.Kamenicky      24/06/11    Upravil kod stazen z netu
**			T.Kamenicky		 13/10/11	 Predelal na STM32F2
**			T.Kamenicky		 29/11/11    Pridal podporu externi SRAM
**
*****************************************************************************
*/

/* Entry Point */
/* This define entry point for linker, this address is used for CPU too as absolute first function */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack, _estack is end of stack */
_estack = 0x20020000;    /* end of 128K RAM */

/* Generate a link error if heap and stack don't fit into RAM */
/* Heap is zero because we use own malloc implementation. The amount of heap is calculated 
 * from free space after compilation, see last section for RAM area */
_Min_Heap_Size = 0x0;      /* required amount of heap  */

/* This stack is used for main function. If FreeRTOS is used this stack is used by OS itself. */
/* The size of stack for tasks is defined in freertos config file and when creating the task. */
_Min_Stack_Size = 0x600; /* required amount of stack */

/* Specify the memory areas */
MEMORY
{
  FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 1022K		  /* This is main program area */
  FACTORY_VAR(rx) :	ORIGIN = 0x080FF800, LENGTH = 2K 		  /* This area is used for factory values, such as MAC address, ID...etc */
  RAM (xrw)       : ORIGIN = 0x20000000, LENGTH = 128K        /* This is RAM area */
  FSMC_SRAM (rx)  : ORIGIN = 0x64000000, LENGTH = 2048K       /* This is useful for external memory, like thru FSMC peripheral */
}

/* Library configurations */
GROUP(libgcc.a libc.a libm.a libnosys.a)

/* Linker script to place sections and symbol values. Should be used together
 * with other linker script that defines memory regions FLASH and RAM.
 * It references following symbols, which must be defined in code:
 *   Reset_Handler : Entry of reset handler
 *
 * It defines following symbols, which code can use without definition:
 *   __exidx_start
 *   __exidx_end
 *   __etext
 *   __data_start__
 *   __preinit_array_start
 *   __preinit_array_end
 *   __init_array_start
 *   __init_array_end
 *   __fini_array_start
 *   __fini_array_end
 *   __data_end__
 *   __bss_start__
 *   __bss_end__
 *   __end__
 *   end
 *   __HeapLimit
 *   __StackLimit
 *   __StackTop
 *   __stack
 */
ENTRY(Reset_Handler)

SECTIONS
{
   /* The startup code goes first into FLASH */
  .isr_vector :
  {
    . = ALIGN(4);
    KEEP(*(.isr_vector)) /* Startup code */
    . = ALIGN(4);
  } >FLASH

  /* The program code and other data goes into FLASH */
  .text :
  {
    . = ALIGN(4);
    *(.text)           /* .text sections (code) */
    *(.text*)          /* .text* sections (code) */
    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */
    *(.glue_7)         /* glue arm to thumb code */
    *(.glue_7t)        /* glue thumb to arm code */

    KEEP (*(.init))
    KEEP (*(.fini))

     . = ALIGN(4);
    _etext = .;        /* define a global symbols at end of code */
  } >FLASH

  /* .ARM.extab names a section that contains exception unwinding information.  See EHABI for details. */
  /* .ARM.exidx names a section that contains index entries for section unwinding.  See EHABI for details. */
   .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
    .ARM : {
    __exidx_start = .;
      *(.ARM.exidx*)
      __exidx_end = .;
    } >FLASH

  /* Is used for compiler information, which is located only in elf file */
  .ARM.attributes 0 : { *(.ARM.attributes) }

  /* Those sections is used for initializing dynamic objects used in C++ */
 .preinit_array     :
  {
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array*))
    PROVIDE_HIDDEN (__preinit_array_end = .);
  } >FLASH
  .init_array :
  {
    PROVIDE_HIDDEN (__init_array_start = .);
    KEEP (*(SORT(.init_array.*)))
    KEEP (*(.init_array*))
    PROVIDE_HIDDEN (__init_array_end = .);
  } >FLASH
  .fini_array :
  {
    PROVIDE_HIDDEN (__fini_array_start = .);
    KEEP (*(.fini_array*))
    KEEP (*(SORT(.fini_array.*)))
    PROVIDE_HIDDEN (__fini_array_end = .);
  } >FLASH

  /* used by the startup as memory location to initialize data */
  /* from this point the content of flash is copied to ram */
  _sidata = .;

  /* Initialized data sections goes into RAM, load LMA copy after code */
  .data : AT ( _sidata )
  {
    . = ALIGN(4);
    _sdata = .;        /* create a global symbol at data start */
    *(.data)           /* .data sections */
    *(.data*)          /* .data* sections */

    . = ALIGN(4);
    _edata = .;       /* define a global symbol at data end */
  } >RAM

  _SRAM_data = _sidata + _edata - _sdata;

  /* Second part of inicialized section goes into SRAM conected thru FSMC */
  /* FSMC_SRAM section, code must be located here explicitly            */
  /* unsigned long int __attribute__ ((section (".sram_data"))) my_initialized_number = 0xAABBCCDD; */
  .fsmc_sram_data : AT ( _SRAM_data )
  {
  	. = ALIGN(4);
    _iSRAM_data = .;        
    *(.sram_data)      
    *(.sram_data*)
    
    . = ALIGN(4);
    _iSRAM_data_end = .;   
  } >FSMC_SRAM
  
  .fsmc_sram_bss : AT ( _iSRAM_data_end )
  {
    _iSRAM_null_data = .;       
    *(.sram_bss)
    *(.sram_bss*)
    
    . = ALIGN(4);
    _iSRAM_null_data_end = .;
  } >FSMC_SRAM
  
  .fsmc_sram_perma : AT ( _iSRAM_null_data_end )
  {
    _iSRAM_perma_data = .;       
    *(.sram_perma)
    *(.sram_perma*)
    
    . = ALIGN(4);
    _iSRAM_perma_data_end = .;
  } >FSMC_SRAM
  
   /* Uninitialized data section */
  . = ALIGN(4);
  
  .bss : AT ( _edata )
  {
    /* This is used by the startup in order to initialize the .bss secion */
    _sbss = .;         /* define a global symbol at bss start */
    __bss_start__ = _sbss;
    *(.bss)
    *(.bss*)
    *(COMMON)

    . = ALIGN(4);
    _ebss = .;         /* define a global symbol at bss end */
    __bss_end__ = _ebss;
  } >RAM
  
  /* Those numbers are used for SRAM init */
  PROVIDE ( _linker_sram_start = _iSRAM_data );
  PROVIDE ( _linker_sram_data_end = _iSRAM_data_end );
  PROVIDE ( _linker_sram_end = _iSRAM_null_data_end );
  PROVIDE ( _linker_sram_inits = _SRAM_data );
  
  /* Those numbers are used for malloc and sbrk functions */
  PROVIDE ( _linker_memory_start = _sdata );
  PROVIDE ( _linker_heap_start = _ebss );
  PROVIDE ( _linker_heap_end = (_estack - _Min_Stack_Size) );
  PROVIDE ( _linker_memory_end = _estack );
  PROVIDE ( _end = _ebss );

   /* User_heap_stack section, used to check that there is enough RAM left */
  ._user_heap_stack : AT ( _linker_heap_end )
  {
    . = ALIGN(4);
    . = . + _Min_Heap_Size;
    . = . + _Min_Stack_Size;
    . = ALIGN(4);
  } >RAM

 /* FLASH memory area for factory default values                          */
  /* Example of usage: extern int foo(void) __attribute__ ((section (".fvtext"))); */
  /* unsigned long int my_factory_number_changed_in_production = 0xAABBCCDD __attribute__ ((section (".fvrodata"))); */ 
  .factory_values :
  {
    . = ALIGN(4);
    *(.fvtext)        /* .fvtext sections (code) */
    *(.fvtext*)       /* .fvtext* sections (code)  */
    *(.fvrodata)      /* read-only data (constants) */
    *(.fvrodata*)
    . = ALIGN(4);
  } >FACTORY_VAR

  /* Remove information from the standard libraries */
  /DISCARD/ :
  {
    libc.a ( * )
    libm.a ( * )
    libgcc.a ( * )
  }
}


Posted by 안녕1999
, |

uint64_t gcc err

C언어,ARM / 2016. 9. 9. 23:30
uint64_t gcc err

=================
Compiler version
=================
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303 (releas
e) [ARM/embedded-4_9-branch revision 221220]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

=================
Compile
=================
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=d:/arm/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper.exe
Target: arm-none-eabi
...

D:\ARM\xxxxxxxxx\inc\stm32f2xx_flash.h:301:65: error: expected ';', ',' or '
)' before 'Data'
 FLASH_Status FLASH_ProgramDoubleWord(uint32_t Address, uint64_t Data);
                                                                 ^ 


임시 해결 : 사용하지 않으므로, 해당 함수 주석처리함.

Posted by 안녕1999
, |

=================

Compiler version

=================

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303 (releas

e) [ARM/embedded-4_9-branch revision 221220]

Copyright (C) 2014 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


macro.h:182:16: error: two or more data types in declaration specifiers

 #define int8_t signed char

                ^ 



Posted by 안녕1999
, |

arm-none-eabi-gcc: error: CreateProcess: No such file or directory

위 문제는 gcc가 내부적으로 cc1.exe을 호출하기 때문입니다.

gcc설치당시 설정된 경로 "../lib/gcc/arm-none-eabi/4.9.3/"에서 호출하기때문입니다.


 d:/XXXX/bin/../lib/gcc/arm-none-eabi/4.9.3/cc1.exe -E -lang-asm -quiet -v -I D

:\Source\Lib -I D:\Source\Lib\XXXX -imultilib armv6-m -iprefix d:\XXXX\bin\../

lib/gcc/arm-none-eabi/4.9.3/ -isysroot d:\XXXX\bin\../arm-none-eabi -D__USES_IN

ITFINI__ -D CORTEX_M0 -D USE_STDPERIPH_DRIVER D:\Source\LAN-AUDIO/XXXX/startup_

XXXX.S -mthumb -mcpu=cortex-m0 -g -fworking-directory -O3 -fno-directives-only

-o C:\DOCUME~1\a\LOCALS~1\Temp\ccwt5swb.s 


결론:

arm-none-eabi

bin

lib

Source

※arm-none-eabi, bin, lib 폴더는 Source폴더와 같이 있어야 한다.(변경불가)


Posted by 안녕1999
, |

stm32f4 gcc compiler for MS windows

윈도우에서 STM32F4 컴파일러 설치



폴더생성

=============

src : source files

orig : original archives

build : elf files

bin : final binary files


다운로드

===========

https://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.gz (35M)

https://ftp.gnu.org/gnu/gcc/gcc-6.2.0/gcc-6.2.0.tar.gz (126M)

https://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.gz (35M)

ftp://sources.redhat.com/pub/newlib/newlib-2.4.0.tar.gz (17M)


※gz, tar확장자는 7zip 같은 프로그램으로 압축을 풀 수 있습니다.


gcc 압축을 푸니, 500M가 넘네요. 헐~~ 머가 이리커..


gcc컴파일하는것도 쉽지 않네요.

그냥 무료 컴파일러 찾아보는게 빠를듯...


EmBitz


참고

https://istarc.wordpress.com/2014/07/21/stm32f4-build-your-toolchain-from-scratch/




Downloads - EmBitz beta 0.42 - Em::Blocks

www.emblocks.org/web/downloads-main/.../17-embitz-beta-0-42
이 페이지 번역하기
EmBitz beta 0.42. EmBitz beta 0.42. File Size: 43.71 MB. Date: 17 November 2015. CRC-32: f158cac9. MD4: d5482b74f4ac4b6d7be9525aa2eee574

Em::Blocks • View topic - Release new EmBitz version 0.42

www.emblocks.org › Board index › EmBlocks › EmBlocks IDE
이 페이지 번역하기
2015. 4. 14. - 댓글 9 - ‎작성자 2
Changes EmBitz Beta 0.42 - License manager is removed (yes everything is free)! - Major update with latest STlinkGDB - A lot of fixes (> 20), ...
게시물 5개
2016년 5월 24일
게시물 3개
2015년 7월 17일
게시물 10개
2015년 6월 25일
게시물 3개
2015년 6월 13일

Em::Blocks: Home

EmBitz and UniCore-MX 11/08/2016 - 18:41, brabo; STM32 Software Breakpoints 08/08/2016 - 17:10, EmBlocks; [solved]STM32L4 support? 06/08/2016 - 21:05, ...


Posted by 안녕1999
, |

최근에 달린 댓글

글 보관함