Category: Programming

My first FPGA board

https://world.taobao.com/item/521509218211.htm?fromSite=main&ali_refid=a3_430008_1006%3A1102706380%3AN%3Afpga%3Ac7143af19b4d9ca3664ce493729cace5&ali_trackid=1_c7143af19b4d9ca3664ce493729cace5&spm=a230r.1.0.0.ebb2eb2uLZqXB

http://pan.baidu.com/s/1i5LMUUD

read count : 1

C++ toolchain’s autotool is too complex

C++ toolchain’s autotool is too complex, if we create a new toolchain and simplify it, it affect almost all mid-to-large scale c++ projects. So those projects has to rewrite their building scripts to adopt to the new toolchain and people will not happy to doing this.

read count : 23

Install Office-365-SDK-for-Java to local maven repository

Since Office-365-SDK-for-Java only support gradle, these commands to install all Jars files to local maven repository,

mvn install:install-file -Dfile=./discovery-services/build/libs/discovery-services-1.0.0.jar -DgroupId=com.microsoft.services -DartifactId=directory -Dversion=1.0.0 -Dpackaging=jar
mvn install:install-file -Dfile=./files-services/build/libs/files-services-1.0.0.jar -DgroupId=com.microsoft.services -DartifactId=files -Dversion=1.0.0 -Dpackaging=jar
mvn install:install-file -Dfile=./graph-services/build/libs/graph-services-0.2.5.jar -DgroupId=com.microsoft.services -DartifactId=graph -Dversion=0.2.5 -Dpackaging=jar
mvn install:install-file -Dfile=./onenote-services/build/libs/onenote-services-0.15.0.jar -DgroupId=com.microsoft.services -DartifactId=onenote -Dversion=0.15.0 -Dpackaging=jar
mvn install:install-file -Dfile=./outlook-services/build/libs/outlook-services-1.0.0.jar -DgroupId=com.microsoft.services -DartifactId=outlook -Dversion=1.0.0 -Dpackaging=jar
mvn install:install-file -Dfile=./sharepoint-services/build/libs/sharepoint-services-1.0.0.jar -DgroupId=com.microsoft.services -DartifactId=sharepoint -Dversion=1.0.0 -Dpackaging=jar

read count : 3

Use this in pom.xml to copy the target jar into kettle plugin folder

Use this in pom.xml to copy the target jar into kettle plugin folder

<build>
		<plugins>
			...
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<id>copy</id>
						<phase>package</phase>
						<configuration>
							<tasks>
								<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar" todir="/Users/peter/Downloads/data-integration/plugins/sharepoint-online/"/>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution> 
				</executions>
			</plugin>

Netbeans 8.2 bundled an old maven which is not ok to compile kettle sdk, please set it to latest maven.

!!! The nexus.pentaho.org maven repository is just super slow in hong kong, run “mvn dependency:go-offline” to cache it to your local repository

read count : 12

Super quick guide : setup stm32 development environment

Super quick guide : setup stm32 development environment, follow these steps:

  1. Download STM32CubeL4, My STM32L476RG board is L4, so don’t download Stm32Cube, just download STM32CubeL4 http://www.st.com/en/embedded-software/stm32cubel4.html
  2. Download and install eclipse http://www.eclipse.org
  3. Install eclipse CDT
  4. (Optional) Install GNU ARM for eclipse http://gnuarmeclipse.github.io/plugins/install/ . After install you have this, the funny thing is that this plugin has stm32 projects but STM32 workbench plugin don’t have
  5. Install GNU ARM Embedded Toolchain, this is optional because i guess step 4 already include an arm compiler, unless you want to manually run arm-none-eabi-gcc in your terminal https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
  6. (Must do this) Install SW4STM32, just install it as a plugin to eclipse http://www.openstm32.org/System+Workbench+for+STM32
  7. Open eclipse
  8. File -> Import -> Existing projects into workspace , choose the from the folder from STM32CubeL4, /Users/peter/Desktop/STM32Cube_FW_L4_V1.8.0/Projects/STM32L476RG-Nucleo/Examples_LL/GPIO/GPIO_InfiniteLedToggling
  9. In eclipse, click Project -> Build project, if everything ok, you will find the bin file in Debug folder, just burn it to the board using command “st-flash write Debug/STM32L476RG_NUCLEO.bin 0x8000000”
  10. Led should be blinking now, see my video
  11. Set come breakpoints and right click the project -> debug, eclipse should able to trap the breakpoint, see below video

read count : 25

[solved] netbeans api transitive module problem

If you meet this, you just forget to add the dependency to pom.xml, so in my case i just add org-netbeans-api-java-classpath then this problem gone.

Project uses classes from transitive module org.netbeans.api:org-netbeans-api-java-classpath:jar:RELEASE82 which will not be accessible at runtime.
To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter

read count : 3

Netbeans minimap, scale factor

If you are editing a file that most of the lines are very short, only few lines are very long. Minimap use the exact line length to render the map, so it doesn’t look very clear. See below. But you can manually adjust the scale factor by right clicking the setting menu on the minimap.

read count : 16

NUCLEO-L476RG

https://developer.mbed.org/platforms/ST-Nucleo-L476RG/

Affordable and flexible platform to ease prototyping using a STM32L476RGT6 microcontroller.

Overview

The STM32 Nucleo board provides an affordable and flexible way for users to try out new ideas and build prototypes with any STM32 microcontroller line, choosing from the various combinations of performance, power consumption and features.

The Arduino™ connectivity support and ST Morpho headers make it easy to expand the functionality of the STM32 Nucleo open development platform with a wide choice of specialized shields.

The STM32 Nucleo board does not require any separate probe as it integrates the ST-LINK/V2-1 debugger/programmer.

Microcontroller features

  • STM32L476RGT6 in LQFP64 package
  • ARM®32-bit Cortex®-M4 CPU
  • Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait state execution from Flash memory
  • 80 MHz max CPU frequency
  • VDD from 1.71 V to 3.6 V
  • 1 MB Flash
  • 128 KB SRAM
  • random generator (TRNG for HW entropy)
  • Quad SPI (1)
  • Timers General Purpose (7)
  • Timers Advanced-Control (2)
  • Timers Basic (2)
  • Timers LowPower (2)
  • Systick
  • Watchdog (2)
  • SPI (3)
  • I2C (3)
  • USART (3)
  • UART (2)
  • LPUART (1)
  • USB OTG Full Speed
  • CAN (1)
  • SAI (2)
  • SDMMC
  • SWPMI
  • LCD 8×28 or 4×32
  • GPIO (51) with external interrupt capability
  • Capacitive sensing with 12 channels
  • 12-bit ADC (3) with 16 channels
  • 12-bit DAC with 2 channels
  • Analog comparator (2)
  • Opamp (2)

Nucleo features

  • Two types of extension resources
    • Arduino Uno Revision 3 connectivity
    • STMicroelectronics Morpho extension pin headers for full access to all STM32 I/Os
  • On-board ST-LINK/V2-1 debugger/programmer with SWD connector
    • Selection-mode switch to use the kit as a standalone ST-LINK/V2-1
  • Flexible board power supply
    • USB VBUS or external source (3.3 V, 5 V, 7 – 12 V)
    • Power management access point
  • User LED (LD2)
  • Two push buttons: USER and RESET
  • USB re-enumeration capability: three different interfaces supported on USB
    • Virtual Com port
    • Mass storage (USB Disk drive) for drag’n’drop programming
    • Debug port

Nucleo pinout

Arduino-compatible headers

/media/uploads/jeromecoutant/nucleo_l476rg_arduino_left_2017_4_21.png/media/uploads/jeromecoutant/nucleo_l476rg_arduino_right_2017_4_21.png

Morpho headers

These headers give access to all STM32 pins.

/media/uploads/jeromecoutant/nucleo_l476rg_morpho_left_2017_4_21.png/media/uploads/jeromecoutant/nucleo_l476rg_morpho_right_2017_4_21.png

Information

Only the labels written in blue/white or green/white (i.e. PA_4, PB_5, A0, D14, LED1…) must be used in your code. The other labels are given as information (alternate-functions, power pins, …).

You can find more details on the available pins and labels in the following files (link to the latest mbed-dev library version):

Supported shields

ST X-NUCLEO boards

See Matrix of tested boards.

Other Non-ST boards

See here.

Getting started

Nucleo ST-LINK/V2 driver installation and firmware upgrade

  • Install the ST-LINK/V2 driver before connecting the Nucleo board to your PC the first time. Follow this LINK for all details.
  • For optimum performances, ensure that the Nucleo ST-LINK/V2 firmware is upgraded to the latest version. Follow this LINK for all details.

Technical references

For more information, please refer to:

Known limitations

The following section describes known limitations of the platform. Note that general issues are tracked into the mbed repositoryavailable on GitHub.

This platform does not present any limitation.

read count : 5