Skip to content

Instantly share code, notes, and snippets.

@cho45
Created March 3, 2016 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cho45/e8145280995995293204 to your computer and use it in GitHub Desktop.
Save cho45/e8145280995995293204 to your computer and use it in GitHub Desktop.
arm-none-eabi-objcopy -O binary .pioenvs/lpc1114fn28/firmware.elf .pioenvs/lpc1114fn28/firmware.bin
text data bss dec hex filename
22948 124 340 23412 5b74 .pioenvs/lpc1114fn28/firmware.elf
arm-none-eabi-g++ --version
arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147]
Copyright (C) 2013 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.
#include "mbed.h"
DigitalOut myled(LED1);
AnalogIn adc(dp1);
int main() {
float foobar = adc.read();
foobar = pow(foobar, 2);
while(1) {
myled = 1;
wait(0.2);
myled = 0;
wait(0.2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment