Datasheet
... and enter the following code:
Create a New Target
Next, you need to create a new target that points to your app via the following command:
... and then configure the new target with the following mandatory fields:
1. Set the Target's app Field
Point the new target to the app we created above via:
2. Set the Target's bsp Field
Next set the bsp (board support package) for the new target, which indicates the HW that the app will be running on.
$ mkdir -p apps/first/src
$ nano apps/first/src/main.c
#include <assert.h>
#include <string.h>
#include "os/os.h"
#include "bsp/bsp.h"
#include "hal/hal_gpio.h"
#include "sysinit/sysinit.h"
int
main(int argc, char **argv)
{
int rc;
/* Initialize the OS */
sysinit();
/* Configure the LED GPIO as an output and HIGH (On) */
hal_gpio_init_out(LED_BLINK_PIN, 1);
while (1) {
/* Run the event queue to process background events */
os_eventq_run(os_eventq_dflt_get());
}
return rc;
}
$ newt target create first
Target targets/first successfully created
$ newt target set first app=apps/first
Target targets/first successfully set target.app to apps/first
© Adafruit Industries https://learn.adafruit.com/adafruit-nrf52-pro-feather Page 50 of 87










