본문 바로가기
micro:bit

micro:bit 장난감

by kanlee2010 2021. 9. 12.

 

3년전 첫째 아이 과학 선생님의 참여 학습 때 감명 받아 급 구매 하게된 ICbandQ 마이크로비트 GENIUS KIT

https://www.icbanq.com/P013150516

아이가 별 흥미를 느끼지 못해 방치했다가 제 장난감으로 사용해 볼까 하고 살펴 봤습니다.

V1.3B로 구해 했는데 찾아보니 Nordic 사 nRF51822 네요.

https://os.mbed.com/platforms/Microbit/

 

BBC micro:bit | Mbed

BBC micro:bit The BBC micro:bit is a pocket-sized, codable computer that allows anyone to get creative with technology. Made possible through a major partnership with 31 organisations, a micro:bit has been given to every 11 or 12 year old child in year 7 o

os.mbed.com

https://tech.microbit.org/hardware/1-3-revision/

 

1.3x micro:bit revision

Overview Hardware block diagram Getting Started With the micro:bit Hardware The micro:bit hardware is based on the Arm-Mbed platform. It has an application processor with lots of on-chip peripherals. Some off-chip peripherals are connected to this chip. Th

tech.microbit.org

Cortex-M0 16MHz 16KiB SRAM, 256KiB Flash 면FreeRTOS 정도는 올려 볼 수 있을 것 같아 시도하고 정리 해 보려고 합니다.

Bluetooth 내장이라 더 해 볼 수 있는게 많을 것 같아 기대되네요.

 

우선 개발 환경을 찾아보니 SEGGER사의 Embedded Studio를 공식 개발 환경으로 하고 있습니다.

https://www.segger.com/downloads/embedded-studio/

 

SEGGER - The Embedded Experts - Downloads - Embedded Studio

Our downloads are protected and signed with SEGGER emSecure! More information about signed downloads, how signatures are created and how easy downloaded files can be verified.

www.segger.com

상용으로도 사용 가능하다고 되어 있네요.

설치를 하고 Tools > Package Manager를 실행하여 nRF를 검색하여 설치 했습니다.

이제 New Project를 해 보겠습니다. 아래와 같이 Embedded Studio의 File > New Project을 실행 합니다.

이후 아래와 같이 우측 상단에서 nrf로 검색하면 NORDIC package를 볼 수 있습니다. prj1으로 신규 생성해 보았습니다.

Target Processor만 nRF51822_xxAA로만 설정하고 나머지는 기본값으로 유지 하였습니다.

마지막 알파벳 두 글자는 패키지 타입으로 보입니다.

제가 가지고 있는 51822은 아래와 같으니 AA로 선택 하였습니다.

최종 설정은 아래와 같이 되었습니다.

이후 포함될 소스 파일들을 선택할 수 있습니다.

마지막으로 Debug와 Release 중에 선택하여 생성할 수 있습니다.

완료 후 좌측에는 아래와 같은 파일들이 생성된 것을 확인할 수 있습니다.

Build > Build prj1 (F7)까지 해 주니 아래와 같이 보이네요.

main.c는 아래와 같이 샘플로 생겼으니 실제 다운로드를 해서 프린트가 출력되는지 다음 글에서 이어가 보겠습니다.

/*********************************************************************
*                    SEGGER Microcontroller GmbH                     *
*                        The Embedded Experts                        *
**********************************************************************

-------------------------- END-OF-HEADER -----------------------------

File    : main.c
Purpose : Generic application start

*/

#include <stdio.h>
#include <stdlib.h>

/*********************************************************************
*
*       main()
*
*  Function description
*   Application entry point.
*/
int main(void) {
  int i;

  for (i = 0; i < 100; i++) {
    printf("Hello World %d!\n", i);
  }
  do {
    i++;
  } while (1);
}

/*************************** End of file ****************************/

댓글