2015年11月10日 星期二

恩智浦半導體 開發版 LPC11C24FBD48 FreeRTOS Cortex M0 LPC1114 LPCXpresso microcontroller LPC11C24


恩智浦半導體前身為飛利浦半導體,由荷蘭企業飛利浦在1953年創立。2006年8月31日,該公司執行長萬豪敦在柏林向客戶和員工宣布公司的新名稱。 恩智浦半導體目前可以提供半導體、系統和軟體解決方案;使用在汽車、手機、智能識別應用、電視、機上盒以及其他電子設備上。

 ~~~~~~~~~~~~~~~~~~~Price: $29.95

http://www.tw.nxp.com/products/microcontrollers/core/cortex_m0plus_m0/LPC11C24FBD48.html


https://eewiki.net/display/microcontroller/Getting+Started+with+NXP's+LPC11XX+Cortex-M0+ARM+Microcontrollers


http://www.freertos.org/FreeRTOS-for-Cortex-M0-LPC1114-LPCXpresso.html


http://www.tw.nxp.com/products/microcontrollers/core/cortex_m0plus_m0/LPC11C24FBD48.html
http://www.tw.nxp.com/board/OM13012.html
http://www.embeddedindia.com/embedded-artists-more.html



LPC11C24 LPCXPRESSO BOARD 
The LPC11C24 LPCXpresso board with NXP's ARM Cortex-M0 microcontroller has been designed to make it as easy as possible to get started with Cortex-M0. The LPCXpresso comprises a target board combined with a JTAG debugger. A free Eclipse-based IDE from NXP is also included.
The LPC11C24 has 8 kB SRAM, 32 kB Flash, integrated CAN-transceiver, 2xSPI, I2C, UART, ADC, etc. Embedded Artists also provides a Prototype board and a Base board that makes it possible to make experiments and prototyping with many peripherals.
LPCXpresso Kit
The LPCXpresso Kit (EA-XPR-106) is a bundle containing the LPC11C24 LPCXpresso Board (EA-XPR-006) and the LPCXpresso Base Board (EA-XPR-021).


LPC11C24 LPCXpresso Board

ProcessorNXP's Cortex-M0 LPC11C24 microcontroller in LQFP48 package
Flash32 kB
Data Memory8 kB
Clock Crystals12.000 MHz crystal for CPU
Dimensions35 x 140 mm
Power3.15V-3.3V external powering, or
from USB via JTAG probe (LPC-LINK)
Connectors• CAN signals available on DSUB-9 footprint (DSUB not mounted)
• All LPC11C24 pins available on expansion connector (2x27 pin rows, 100 mil pitch, 900 mil between rows)
Other• Embedded JTAG (LPC-LINK) functionality via LPCXpresso toolchain
• LPC-LINK can be connected to external target processor after modifications to the LPCXpresso board
• LED on PIO0_7



The following resources are available for download.
Documents
EAGLE library
Forum and Support
Cortex-M0 Information

http://www.embeddedartists.com/products/lpcxpresso/lpc11C24_xpr.php



http://www.lextronic.fr/P27273-module-lpc11c24-lpcxpresso-board.html







  
  



Votre application pourra être développée en langage "C" via l'environnement de développement IDE open source "Eclipse".
  




RGBW LED Controller – The Kit Control your blinky!!! Meet the RGBW LED Controller. Again.

http://thecustomgeek.com/kits/rgbw-led-controller/


RGBW LED Controller – The Kit

Control your blinky!!!


https://www.youtube.com/watch?v=t1cdyNiGz84

Meet the RGBW LED Controller. Again. 

This is version 3.1 and has new features and firmware! 

It is a LED controller that features an embedded ATmega328 with an Arduino bootloader for easy programming,

 4 channel LED control with dimming, 

5 or 12 volt output, IR receiver,

 XBee Adapter header, RS-232 or TTL serial I/O, 2 push buttons, 13 pin extensions for all unused pins (6 analog and 7 digital),

 power and channel LED indicators, and dual power input options. You can control 5 or 12 volt LED’s via serial with adjustments to the level of any channel with ramping to the desired level, 

rate of ramping, color cycle start and stop,

 rate of color cycle, length of stay on each color during cycle. Fans and motors can also be driven with ease. Be sure and also visit the

阿呀 四色led 4通道 led 控制器,ATmega328 處理器,arduino開機程序,可以簡單地寫程式

四個通道5或12v電壓閃爍輸出,紅外線接收器,XBee連接,RS232,TTL序列資料,兩個按鈕,13個外接腳(6個 類比,7 個數位輸入)

LED通道可以就受雙電壓選擇 5或12v

 顏色循環控制










商店
I now have FTDI Adapters in the store!
I now have an updated downloadable PDF manual with pictures! :)
Remember, this is not a shield, it works standalone, without an Arduino!
Please ask all questions in the forums, thanks!
If you are looking for one already assembled, in a case and ready to go, you can find a retail version at http://rs232ledcontroller.com.

Pointers and Arrays Java Native Interface JNI JDB CLI Common Intermediate Language Infrastructure

http://www.gamedev.net/page/resources/_/technical/general-programming/a-tutorial-on-pointers-and-arrays-in-c-r1697#ch7

A Tutorial on Pointers and Arrays in C

By Ted Jensen | Published Feb 16 2002 07:35 PM in General Programming


21 SWIG and Java


Java Programming/Print version


Translating Java Programs into C++

C++ Programming Language

Pointers, References and Dynamic Memory Allocation

Advanced Memory Management: Dynamic Allocation, Part 1

By Andrei Milea

malloc and free, new and delete


Dynamic allocation is one of the three ways of using memory provided by the C/C++ standard. To accomplish this in C the malloc function is used and the new keyword is used for C++. Both of them perform an allocation of a contiguous block of memory, malloc taking the size as parameter:
int *data = new int;    
int *data = (int*) malloc(sizeof(int));         //notice the use of sizeof for portability


https://github.com/davidar/lljvm
https://davidar.io
Low Level Java Virtual Machine 

LLVM 2.7 must be installed to compile and run LLJVM. Jasmin is needed for assembling JVM bytecode.
To compile LLJVM, simply call make in the project root directory, and call make check to run the test suite.

NestedVM

Binary translation for Java

Welcome

NestedVM provides binary translation for Java Bytecode. This is done by having GCC compile to a MIPS binary which is then translated to a Java class file. Hence any application written in C, C++, Fortran, or any other language supported by GCC can be run in 100% pure Java with no source changes.

Google search

http://web.mit.edu/javadev/doc/tutorial/native1.1/implementing/index.html


http://c2.com/cgi/wiki?OtherLanguagesForTheJavaVm

Other Languages For The Java Vm

Despite what some DotNet/CommonLanguageRuntime (CLR) proponents claim, the JavaVirtualMachine supports multiple languages as well. See http://www.robert-tolksdorf.de/vmlanguages.html for the gory details.

http://www.xwt.org/mips2java/

Mips2Java

XWT needs two rather crucial open source (typically Linux-related) libraries which are written in C/C++: libjpeg (for non-JVM and J2ME platforms) and Freetype2. A crucial design decision which has kept XWT so portable is that it must not use any code which cannot compile under jdk1.1, and must not use any classes outside of the java.langjava.textjava.netjava.io, and java.util packages.

https://code.google.com/p/cibyl/wiki/Cibyl

The Kawa Scheme language

Kawa is a general-purpose programming language that runs on the Java platform. It aims to combine:
  • the benefits of dynamic scripting languages (non-verbose code with less boiler-plate, fast and easy start-up, a REPL, no required compilation step); with
  • the benefits of traditional compiled languages (fast execution, static error detection, modularity, zero-overhead Java platform integration).

clang: a C language family frontend for LLVM

The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler. You can get and build the source today.


libgccjit

This document describes libgccjit, an API for embedding GCC inside programs and libraries.
Note that libgccjit is currently of “Alpha” quality; the APIs are not yet set in stone, and they shouldn’t be used in production yet.
There are actually two APIs for the library:
  • a pure C API: libgccjit.h
  • a C++ wrapper API: libgccjit++.h. This is a collection of “thin” wrapper classes around the C API, to save typing.
http://usenix.org/legacy/publications/library/proceedings/coots97/full_papers/muller/muller_html/node3.htmlHarissa is a Java environment that includes a compiler from Java bytecode to C and a Java Virtual Machine integrated in a runtime library. 



The FPC backend for the Java Virtual Machine (JVM) generates Java byte code that conforms to the specifications of the JDK 1.5 (and later), and also to the Dalvik VM from the Android platform. While not all FPC language features work when targeting the JVM, most do (or will in the future) and we have done our best to introduce as few differences as possible.


Debugging Java Code

If your program terminates with a thread dump, and if you are using a just-in-time compiler Java VM (by default, JDK runs as just-in-time compiler VM), then the thread dump will likely contain lots of useless information. To get thread dump information in terms of your Java source code, compile with -g and run the Java virtual machine in all-interpreted mode using the -Djava.compiler=NONE command line argument:
java -Djava.compiler=NONE blah

Compile with -g. This will cause the java compiler to put Java source code line information in .class files:

javac -g blah.java
JDB

Use jdb to set breakpoints, dump thread stacks, and step through the execution. jdb has a dbx-like interface rather than a gdb-like interface. Running jdb and typing help will provide you with information about jdb's commands. Here are some  


List of CLI languages

From Wikipedia, the free encyclopedia


Java Programming Tutorial

Java Native Interface (JNI)


2.1  JNI with C
Step 1: Write a Java Class that uses C Codes - HelloJNI.java 
public class HelloJNI {
   static {
      System.loadLibrary("hello"); // Load native library at runtime
                                   // hello.dll (Windows) or libhello.so (Unixes)
   }

   // Declare a native method sayHello() that receives nothing and returns void
   private native void sayHello();

   // Test Driver
   public static void main(String[] args) {
      new HelloJNI().sayHello();  // invoke the native method
   }
}
The static initializer invokes System.loadLibrary() to load the native library "Hello" (which contains the native method sayHello()) during the class loading. It will be mapped to "hello.dll" in Windows; or "libhello.so" in Unixes. This library shall be included in Java's library path (kept in Java system variable java.library.path); otherwise, the program will throw a UnsatisfiedLinkError. You could include the library into Java Library's path via VM argument -Djava.library.path=path_to_lib.
Next, we declare the method sayHello() as a native instance method, via keyword native, which denotes that this method is implemented in another language. A native method does not contain a body. The sayHello() is contained in the native library loaded.
The main() method allocate an instance of HelloJNI and invoke the native method sayHello().
Compile the "HelloJNI.java" into "HelloJNI.class".
> javac HelloJNI.java
Step 2: Create the C/C++ Header file - HelloJNI.h
Run javah utility on the class file to create a header file for C/C++ programs:
> javah HelloJNI
The output is HelloJNI.h as follows: 
/* DO NOT EDIT THIS FILE - it is machine generated */
#include
/* Header for class HelloJNI */

#ifndef _Included_HelloJNI
#define _Included_HelloJNI
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     HelloJNI
 * Method:    sayHello
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv *, jobject);

#ifdef __cplusplus
}
#endif
#endif
The header declares a C function Java_HelloJNI_sayHello as follows:
JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv *, jobject);
The naming convention for C function is Java_{package_and_classname}_{function_name}(JNI arguments). The dot in package name shall be replaced by underscore.
The arguments:
JNIEnv*: reference to JNI environment, which lets you access all the JNI fucntions.
jobject: reference to "this" Java object.
We are not using these arguments in the hello-world example, but will be using them later. Ignore the macros JNIEXPORT and JNICALL for the time being.
The extern "C" is recognized by C++ compiler only. It notifies the C++ compiler that these functions are to be compiled using C's function naming protocol (instead of C++ naming protocol). C and C++ have different function naming protocols as C++ support function overloading and uses a name mangling scheme to differentiate the overloaded functions. Read "Name Mangling".
Step 3: C Implementation - HelloJNI.c

#include
#include
#include "HelloJNI.h"

// Implementation of native method sayHello() of HelloJNI class
JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv *env, jobject thisObj) {
   printf("Hello World!\n");
   return;
}
Save the C program as "HelloJNI.c".
The header "jni.h" is available under the "\include" and "\include\win32" directories, where is your JDK installed directory (e.g., "c:\program files\java\jdk1.7.0").
The C function simply prints the message "Hello world!" to the console.
Compile the C program - this depends on the C compiler you used.
For MinGW GCC in Windows
> set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_{xx}
      // Define and Set environment variable JAVA_HOME to JDK installed directory
      // I recommend that you set JAVA_HOME permanently, via "Control Panel" ⇒ "System" ⇒ "Environment Variables"
> echo %JAVA_HOME%
      // In Windows, you can refer a environment variable by adding % prefix and suffix 
> gcc -Wl,--add-stdcall-alias -I"%JAVA_HOME%\include" -I"%JAVA_HOME%\include\win32" -shared -o hello.dll HelloJNI.c
      // Compile HellJNI.c into shared library hello.dll
The compiler options used are:
-Wl: The -Wl to pass linker option --add-stdcall-alias to prevent UnsatisfiedLinkError (symbols with a stdcall suffix (@nn) will be exported as-is and also with the suffix stripped). (Some people suggested to use -Wl,--kill-at.)
-I: for specifying the header files directories. In this case "jni.h" (in "\include") and "jni_md.h" (in "\include\win32"), where denotes the JDK installed directory. Enclosed the directory in double quotes if it contains spaces.
-shared: to generate share library.
-o: for setting the output filename "hello.dll".
You can also compile and link in two steps:
// Compile-only with -c flag. Output is HElloJNI.o
> gcc -c -I"%JAVA_HOME%\include" -I"%JAVA_HOME%\include\win32" HelloJNI.c

// Link into shared library "hello.dll"
> gcc -Wl,--add-stdcall-alias -shared -o hello.dll HelloJNI.o
Try nm (which list all the symbols) on the shared library produced to look for the sayHello() function. Take note the GCC added prefix _ and suffix @8 (the number of bytes of parameters). Check for the function name Java_HelloJNI_sayHello with type "T" (defined).
> nm hello.dll | grep say
624011d8 T _Java_HelloJNI_sayHello@8
For Cygwin GCC in Windows
You need to define the type __int64 as "long long" via option -D _int64="long long".
For gcc-3, include option -mno-cygwin to build DLL files which are not dependent upon the Cygwin DLL.
> gcc-3 -D __int64="long long" -mno-cygwin -Wl,--add-stdcall-alias 
  -I"\include" -I"\include\win32" -shared -o hello.dll HelloJNI.c
For gcc-4: I still cannot find the correct compiler option (-mno-cygwin is not supported). The Java program hangs!
Step 4: Run the Java Program
> java HelloJNI
or
> java -Djava.library.path=. HelloJNI
You may need to specify the library path of the "hello.dll" via VM option -Djava.library.path=, as shown above.



Java programming with JNI

This tutorial describes and demonstrates the basic and most commonly used techniques of the Java Native Interface -- calling C or C++ code from Java programs, and calling Java code from C or C++ programs -- to help you develop your own JNI solutions quickly and efficiently.


Java Native Interface with C tutorial--


Wrapping a C++ library with JNI – introduction


Calling C code from Java using JNI

In this tutorial we'll be creating a Java application calling code from a native library. We'll have a Java application called HelloWorld which will call the function helloFromC from a shared library named ctest, using Java Native Interface.

程式語言 比較 , 程式設計的 實用讀本 網站 Comparison Programming Chrestomathy Rosetta Code Programming Languages commonly used features in a side-by-side format

https://en.wikipedia.org/wiki/Comparison_of_programming_languages
http://www.jvoegele.com/software/langcomp.html
programming chrestomathy

 Programming Chrestomathy

A chrestomathy is a sample of a given text in two or more different languages, for the purpose of teaching the different grammars and idioms.
m-w.com says
 1 : a selection of passages used to help learn a language
 2 : a volume of selected passages or stories of an author


Chrestomathy 

Chrestomathy (/krɛsˈtɒməθi/ kres-tom-ə-thee; from the Ancient Greek χρηστομάθεια “desire of learning” = χρηστός “useful” + μανθάνω “learn”) is a collection of choice literary passages, used especially as an aid in learning a subject.

簡單來說,就是 程式設計的 實用讀本


Rosetta Code is a programming chrestomathy site.

 The idea is to present solutions to the same task in as many 

Rosetta Code 是個 “ 程式設計的 實用讀本 ” 網站,發想是 展示 方案(寫程式碼的方案), 介紹 可執行的許多方法,與語言 ,展現更多語言的不同語區別,

different languages as possible, to demonstrate how languages are similar and different, 

and to aid a person with a grounding in one approach to a problem in learning another.

提供個人一個整體性的學習

 Rosetta Code currently has 780 tasks, 175 draft tasks, and is aware of 595 languages

though we do not (and cannot) have solutions to every task in every language.

現在有超多項目與語言的資料提供

實作 Unux 目錄指令 ls

實作 資料驗證 MD5
The purpose of this task to code and validate an implementation of the MD5 Message Digest Algorithm by coding the algorithm directly (not using a call to a built-in or external hashing library). 

http://hyperpolyglot.org

Hyperpolyglot

Programming Languages
commonly used features in a side-by-side format

Scripting Languages I:Node.js, PHP, Python, Ruby
Scripting Languages II:Perl, Lua, Groovy
GUI Scripting:JavaScript, Smalltalk, Tcl, AutoHotkey
Command Line Interpreters:POSIX Shell, Cmd.exe, PowerShell
Forth and PostScript:Forth, PostScript
Prolog and Erlang:Prolog, Erlang
Lisp Dialects:Common Lisp, Racket, Clojure, Emacs Lisp
C and Go:C, Go
OO C Style Languages:C++, Objective-C, Java, C#
Rust, Swift, Scala:Rust, Swift, Scala
TypeScript, Dart, Hack:TypeScript, Dart, Hack
Pascal Style Languages:Pascal, Ada, PL/pgSQL
ML Dialects and Haskell:SML, OCaml, F#, Haskell
Numerical Analysis & Statistics:MATLAB, R, NumPy
Computer Algebra Software:Mathematica, SymPy, GAP, Pari/GP
Gnuplot and GLPK:Gnuplot, GLPK
Fortran and APL:Fortran, APL
Relational Data Languages:SQL, Awk, Pig

Programming Tools

Unix Shells:Bash, Fish, Ksh, Tcsh, Zsh
Text Mode Editors:Vim, Emacs, Nano
Version Control:Git, Mercurial
Build Tools:Make, Rake, Ant, MSBuild
Terminal Multiplexers:Screen, Tmux
Relational Databases:PostgreSQL, MySQL, SQLite
Lightweight Markup:Markdown, reStructuredText, MediaWiki, AsciiDoc, Org-mode
2D Vector Graphics:PostScript, Processing, SVG

http://eqcode.com/wiki/Main_PageEqcode aims to show "equivalent codes for all languages," so it provides an index of common languages with drill-downs to specific concepts or tasks, such as removing a specific element from an array or constructing a regex to match an email address. The breadth of languages is decent, but the concepts addressed are somewhat scattershot, and it isn't updated often; 
equivalent code wiki - eqcode.com
Equivalent codes for all languages!
2015-11-10 07:32 (UTC)


Languages


http://cw.tactileint.com
CrossWise is a quick reference for computer languages used in website programming. Specifically, it compares languages side-by-side, feature-by-feature, so that you can understand the differences in syntax and concepts between languages so that you can port your site, or yourself, more quickly and with less frustration.
We're still early in the project so bear with me. Send too allan att tactileint daught calm and tell me what you think.
他是提供你一個 電腦語言 的 快速手冊,比較 電腦語言 之間 的特色
http://algpedia.dcc.ufrj.br




Turn your nose up at Dart and instead smell the CoffeeScript



PLEAC - Programming Language Examples Alike Cookbook

Status

The latest status is accessible from here (the Perl part is the Solutions from the Perl Cookbook, the rest is PLEAC contents):

Related links

These are interesting projects on the same topic (thanks to Pixel):
http://www.westnet.com/mirrors/99bottles/beer.html