Internet of Things | Introduction to IAR Integrated Development Environment | cc254 Core Board Hardware Resources | Bluetooth 4.0 BLE Basics for the Internet of Things - Study Notes (3)

4. Introduction to IAR Integrated Development Environment

A complete and stable professional embedded development environment, with a unified user interface for different processors, supporting more than 35 MCUs, including 8, 16, and 32 bits, fully
compatible with C language and
efficient floating-point support,
IAR main interface:
insert image description here
Create an empty project test, create an empty file main.c, add it to test: insert image description here
modify main.c:
insert image description here
insert image description here

#include <ioCC2540.h>
#define BV(n) (1<<(n))

void delay(unsigned int time)
{
  int i,j;
  for (i = 0;i <= time;i++)
      for (j = 0;j <= 1000;j++);

}

int main()
{
   //端口的配置,设置P1.0为输出
   P1DIR |= BV(0);
   //设置端口为GPIO
   P1SEL &= ~BV(0);
   while(1)
   {
      P1_0 = 1;
      delay(1000);
      P1_0 = 0;
      delay(1000);
   }

}

Set options: target selection: Texas Instruments->CC2540F256.i51 insert image description here
link check: Override default
insert image description here
debugger driver selection: Texas Instruments
save as test1, compile, prompt:
Building configuration: test - Debug
Updating build tree...
main.c
Linking

Total number of errors: 0
Total number of warnings: 0

Click the simulation next to make (you need to install the driver in advance): insert image description here
here set the debugger to simulate, software simulation.insert image description here

5. cc254 core board hardware resources

Onboard resources insert image description here
Balun antenna matching Crystal insert image description here
oscillator (2) insert image description here
power supply circuit insert image description here
Lithium battery power supply insert image description here
insert image description here
LEDinsert image description here
insert image description here

oledinsert image description here

Serial port circuitinsert image description here

Guess you like

Origin blog.csdn.net/Medlar_CN/article/details/130583313