Thursday, October 27, 2016

STM32F3 Discovery + libopencm3, using USART.

I made STM32 development environment by gcc + libopencm3.
libopencm3 examples include using USART  for STM32F429, but STM32F3 is nothing.
So, I refer usart_console program for STM32F4 then successfully run on the STM32F3 discovery board.
I changed USART register name for running on STM32F3.

void console_putc(char c)
{
        uint32_t        reg;
        do {
                reg = USART_ISR(CONSOLE_UART);
        } while ((reg & USART_ISR_TXE) == 0);
        USART_TDR(CONSOLE_UART) = (uint32_t) c & 0xff;
}

char console_getc(int wait)
{
        uint32_t        reg;
        do {
                reg = USART_ISR(CONSOLE_UART);
        } while ((wait != 0) && ((reg & USART_ISR_RXNE) == 0));
        return (reg & USART_ISR_RXNE) ? USART_RDR(CONSOLE_UART) : '\000';
}


USART_ISR is "Interrupt and status register".(STM32F4 is USART_SR)
USART_TDR is "Transmit Data Register".(STM32F4 is USART_DR)
USART_RDR is "Receive Data Register".(STM32F4 is USART_DR)

Some constitution of registers are different from STM32F4 in STM32F3.
  

Have a good your computing!


Tuesday, October 11, 2016

STM32 develop embed programs by gcc environment.

I made development for STM32f429 discovery uClinux environment.
This time, let it add gcc development on my environment. Because, I have STM32f429 discovery and STM32f303 discovery boards.

First: Installing toolchain.
It needs Arm instruction set compiling and working out binary files tools.
And, the binary files are made by ARM non eabi mode instruction set.
It tools called "Toolchain", that you can be able to get running on your PC binaries from the Web.
binutils-arm-none-eabi, gcc-arm-none-eabi

You can install your PC(Ubuntu) by the "apt-get" command.
$ apt-get install binutils-arm-none-eabi gcc-arm-none-eabi

Confirmation passes installing by below command.
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (4.8.2-1ubuntu1+6) 4.8.2
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.
$


Next: Installing STM32 firmware.
There is libopencm3 project that is ARM multi platform hardware farmware developing.
I choice that project.

Getting source tree from git command.
$ git clone https://github.com/libopencm3/libopencm3-examples.git<

Making firmware. 
$ cd libopencm3
$ git submodule init
$ git submodule update
$ make


Examples: Getting start !
Showing a STM32f303 discovery board example doing.
$ cd examples/stm32/f3/stm32f3-discovery/miniblink
$ make

Connection your STM32f303 discovery board on your PC via USB cable, and start openocd.
$ sudo openocd -f /usr/local/share/openocd/script/board/stm32f3discovery.cfg

And, you open other terminal and run telnet to connect openocd and flash operations..
$ telnet 4444
reset halt
flash write_image erase miniblink.elf
reset

If successflly write STM32f303 discovery board, when light blue LED !


Showing a STM32f429 discovery board example doing.
To do STM32f429 discovery board is the same STM32f303 doscovery bord.
$ cd examples/stm32/f4/stm32f429-discovery/miniblink
$ make

Connection your STM32f429 discovery board on your PC via USB cable, and start openocd.
$ sudo openocd -f /usr/local/share/openocd/script/board/stm32f429discovery.cfg

And, you open other terminal and run telnet to connect openocd and flash operations.
$ telnet 4444
reset halt
flash write_image erase miniblink.elf
reset

If successflly write STM32f29 discovery board, when light green LED(LED3) !


Flash writing use OpenOCD.
  How to get and install OpemPCD to see old my blog.


Let's enjoy computing !


Monday, October 10, 2016

Soup curry restaurant, "Firi Firi"

The soup curry is a local specialty in Sapporo Hokkaido Japan.
I didn't have time in Sapporo, but I have craving soup curry in Sapporo !
So, I searched soup curry shop nearest the Sapporo station by using Google Map. Finding shop is "Firi Firi 2 gou"(ヒリヒリ2号) that locate under guard. The shop is hard to find and step to the buck of passageway under the guard.

Shop's waitress recommends hot level 3, because if you are first time to eat this restaurant and you love hot. But I want more hot flavor. If I have chance of to visit this restaurant, when try to Level 4 or 5 !
I had "Soup curry with chicken leg quarters"(骨チキンカリー) that is typical food in the shop.
"Soup curry with chicken leg quarters" include chicken leg quarters, many vegetables and rice.

930Yen.





Evaluation:
☆☆☆☆-

My Impressions:
   Taste:☆☆☆--
   Voume:☆☆☆☆-
   Performance:☆☆☆☆☆

Descent point:
Nohting !
If I had to choose, I should have taken upper hot level...


Sandwich House, in Shin-Chitose Air terminal.

"Sandwich House Gourmet"
I bought sandwich is "Roast beef, vegetables and cheese". This is good aperitif sandwich with wine.





Evaluation:
☆☆☆?-

My Impressions:
   Taste:☆☆☆--
   Voume:☆☆☆--
   Performance:☆☆☆☆-

Descent point:
I like flavor is more a little spicy.


Air Terminal Hotel, in CTS (3F CTS BLD,New Chitose Airport,Bibi,Chitose city, Hokkaido)

Do you love plane?

I stayed runway side room then I saw fronting of boarding bridge and plane. In the night, the lighting of runway was very amazing view.



Guests are able to use hot spring facilities in the airport(CTS 新千歳空港温泉). When you use hot spring, you exchange room key to using ticket. That isn't limit of numbers, for examples you can use night and morning. But! hot spring place locate out of hotel's area that is the airport facilities, and when your traveling don't forget dress.
In the hot spring place rent you free of charge Yukata or Jinbei(Japanese relaxed ware) and you can use relaxation room(The place has lady's room).
You'd check present time in the hot spring place, this airport has many restaurant bat some shop is early closing against showing opening time. Some shops closing start 19:30, food court shop's showing opening time is 10:00-2030 but closing start is around 20:00 (cause of sold out?). You are careful present time that isn't Narita or Haneda... (Some restaurant are opening 22:00 in CTS.)
To take matters worse, the airport shutout 23:00. If you relaxed too hot spring, when you should walk to hotels's entry via outside airport facilities.

And more one, card lounge don't locate inside the restricted area, so I can't experience this airport card lounge.


Saturday, October 8, 2016

Train drinking! Hakodate --> Shin Chitose international air port(CTS).

My traveling is Hakodate for Shin Chitose international air port(CTS) by express train Super Hokuto. Traveling duration is around three hour half minute.
Let me enjoy traveling and drinking !   #Trainbeer

Express Super-Hokuto and Hokuto are different train cars. I recommend to choice Super-Hokuto and reservation seat. Because, between Hakodate-Sapporo section is may congestion suddenly.



Let me drink!

Ika Jaga:
  Whole squid was stuffed potato.
Zangi kusi:
  Zangi is flied chicken Hokkaido style.
Nikuman:
  Limited Hokkaido flavor.
Sapporo Classic:
  Limited Hokkaido.
Haodate wine:
  Hakodate local wine.


Soft server ice cream Kikuchi in Hakodate.

Kikuchi is a small caffe shop, but this shop's soft served ice cream is excellent.

Flavors:
  Vanilla 260Yen
  Mocha 260Yen
  Mix(Vanilla+Mocha) 260Yen



Evaluation:
☆☆☆☆☆

My Impressions:
   Taste:☆☆☆☆☆
   Voume:☆☆☆☆☆
   Performance:☆☆☆☆☆

Descent point:
Nohting !
If I had to choose, the shop is small. If you are big group, when you can't seat all members.
But, you buy cheap by outside counter and eat at road are no problem.


Running in Hakodate morning. Take-2

I ran along shoreline yesterday, so today, I'm going to run around Goryokaku(五稜郭).
At the place, some runners already jog along Goryokaku moat road.

Goryokaku tower hight is 107m that visible even from distance.

Gryokaku moat circumference is 1.8Km.

Goryokaku shape is five pointed star.

I recommend to bring jogging equipments, when you visit Hakodate.
By the way, Season of Sakura in this reasion is early May. 


Running in Hakodate morning.

The weather was good, and it was comfortable to run along an early-morning shoreline of Hakodate.

Running start is 6:00 AM. Breeze is chilly.


The fishing port locate at the foot of Mt. Hakodate.


I return at the starting location and can see Mt. Hakodate in the distant.


Running Map.



Grilled Mutton Pot restaurant in Hakodate.

The dish is grilled mutton and vegetables called Jingisukan-Nabe (ジンギスカン鍋). I bought Ganguro-Set and mutton loin, and beers.

Cover charge and beer.


Ganguro combo include mutton, vegetables and rice.


Mutton loin.


Map.

Evaluation:
☆☆?--

My Impressions:
   Taste:☆☆☆--
   Voume:☆☆---
   Performance:☆☆---

Descent point:
I feel the meat is small each a dish, but good taste.


French restaurant Perry's bar in Hakodate.

We had lunch at Perry's bar that is a small Freanch restaurant at Hakodate Hokkaido Japan.
Hakodate locate south Hokkaido Japan, so there are many shops of the seasning that is thick because  there is a cold district.
However, this shop sauce is thin and using Japanese style flavor. In addition, we had ate dishes are using ingredients lavished with local products.

Appetizer.


Soup.


Steak.


Dessert.


Map

Evaluation:
☆☆☆☆-

My Impressions:
   Taste:☆☆☆☆?
   Voume:☆☆☆☆-
   Performance:☆☆☆--

Descent point:
I feel good restaurant except a little expensive.