• R/O
  • HTTP
  • SSH
  • HTTPS

kz_h8write: Commit

H8/3069F writer for KOZOS - kz_h8write


Commit MetaInfo

Revision08558a318d3ce09cf0470df0573263095114be09 (tree)
Zeit2012-12-19 10:35:47
AutorShinichiro Nakamura <shinta.main.jp@gmai...>
CommiterShinichiro Nakamura

Log Message

Copied from the private repository.

Ändern Zusammenfassung

Diff

--- a/doc/README.txt
+++ b/doc/README.txt
@@ -53,12 +53,18 @@ serial.h シリアルポートライブラリのインターフェー
5353 書籍では、-3069、-f20、MOTファイル名、シリアルデバイスが指定されている。
5454
5555 2012/12/18 Version 0.2.0
56- 書き込み対象motファイルに依存して起きるバグを修正した。
56+ 書き込み対象motファイルサイズに依存して起きるバグを修正した。
57+
58+2012/12/19 Version 0.2.1
59+ バージョン番号の更新漏れを修正した。
60+ 書き込み最終アドレス計算のバグを修正した。
5761
5862 =======================================
5963 謝辞
6064 =======================================
6165 やまちゅうさん
6266 Version 0.0.1でおきる問題について詳細なレポートを頂きました。
67+
6368 蔵花たけしさん
6469 Version 0.1.0でおきる問題について詳細なレポートを頂きました。
70+
Binary files /dev/null and b/doc/brochure.pdf differ
--- a/src/kz_h8write.c
+++ b/src/kz_h8write.c
@@ -6,10 +6,9 @@
66
77 /*
88 * ===============================================================
9- * KOZOS h8write
10- * Version 0.1.0
9+ * KOZOS H8/3069F Flash Writer.
1110 * ===============================================================
12- * Copyright (c) 2010-2011 Shinichiro Nakamura
11+ * Copyright (c) 2010-2012 Shinichiro Nakamura
1312 *
1413 * Permission is hereby granted, free of charge, to any person
1514 * obtaining a copy of this software and associated documentation
@@ -119,11 +118,12 @@ void mot_callback(
119118 const unsigned char *buf,
120119 const int siz)
121120 {
121+ unsigned int lastaddr = addr + siz;
122122 for (int i = 0; i < siz; i++) {
123123 memory_image[addr + i] = buf[i];
124124 }
125- if (memory_lastaddr < addr) {
126- memory_lastaddr = addr;
125+ if (memory_lastaddr < lastaddr) {
126+ memory_lastaddr = lastaddr;
127127 }
128128 }
129129
--- a/src/kz_h8write.h
+++ b/src/kz_h8write.h
@@ -6,10 +6,9 @@
66
77 /*
88 * ===============================================================
9- * KOZOS h8write
10- * Version 0.1.0
9+ * KOZOS H8/3069F Flash Writer.
1110 * ===============================================================
12- * Copyright (c) 2010-2011 Shinichiro Nakamura
11+ * Copyright (c) 2010-2012 Shinichiro Nakamura
1312 *
1413 * Permission is hereby granted, free of charge, to any person
1514 * obtaining a copy of this software and associated documentation
@@ -38,8 +37,8 @@
3837 #define KZ_H8WRITE_H
3938
4039 #define VERSION_MAJOR 0
41-#define VERSION_MINOR 1
42-#define VERSION_RELEASE 0
40+#define VERSION_MINOR 2
41+#define VERSION_RELEASE 1
4342
4443 /**
4544 * @brief エラーコード。
--- a/src/kz_h8write.sln
+++ b/src/kz_h8write.sln
@@ -5,6 +5,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kz_h8write", "kz_h8write.vc
55 EndProject
66 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "motdump", "motdump.vcxproj", "{8FAD7366-C15B-44F0-956B-2665830B9E8A}"
77 EndProject
8+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package.vcxproj", "{67800DBE-C6A9-4E1A-A1DD-A40347489C22}"
9+ ProjectSection(ProjectDependencies) = postProject
10+ {C2A6023E-AFED-407F-B679-96F056BAA96A} = {C2A6023E-AFED-407F-B679-96F056BAA96A}
11+ {8FAD7366-C15B-44F0-956B-2665830B9E8A} = {8FAD7366-C15B-44F0-956B-2665830B9E8A}
12+ EndProjectSection
13+EndProject
814 Global
915 GlobalSection(SolutionConfigurationPlatforms) = preSolution
1016 Debug|Win32 = Debug|Win32
@@ -19,6 +25,10 @@ Global
1925 {8FAD7366-C15B-44F0-956B-2665830B9E8A}.Debug|Win32.Build.0 = Debug|Win32
2026 {8FAD7366-C15B-44F0-956B-2665830B9E8A}.Release|Win32.ActiveCfg = Release|Win32
2127 {8FAD7366-C15B-44F0-956B-2665830B9E8A}.Release|Win32.Build.0 = Release|Win32
28+ {67800DBE-C6A9-4E1A-A1DD-A40347489C22}.Debug|Win32.ActiveCfg = Debug|Win32
29+ {67800DBE-C6A9-4E1A-A1DD-A40347489C22}.Debug|Win32.Build.0 = Debug|Win32
30+ {67800DBE-C6A9-4E1A-A1DD-A40347489C22}.Release|Win32.ActiveCfg = Release|Win32
31+ {67800DBE-C6A9-4E1A-A1DD-A40347489C22}.Release|Win32.Build.0 = Release|Win32
2232 EndGlobalSection
2333 GlobalSection(SolutionProperties) = preSolution
2434 HideSolutionNode = FALSE
--- a/src/motdump.c
+++ b/src/motdump.c
@@ -46,11 +46,12 @@ void cb_data(
4646 const unsigned char *buf,
4747 const int siz)
4848 {
49+ unsigned int lastaddr = addr + siz;
4950 for (int i = 0; i < siz; i++) {
5051 memory_image[addr + i] = buf[i];
5152 }
52- if (memory_lastaddr < addr) {
53- memory_lastaddr = addr;
53+ if (memory_lastaddr < lastaddr) {
54+ memory_lastaddr = lastaddr;
5455 }
5556 }
5657
--- /dev/null
+++ b/src/package.vcxproj
@@ -0,0 +1,96 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+ <ItemGroup Label="ProjectConfigurations">
4+ <ProjectConfiguration Include="Debug|Win32">
5+ <Configuration>Debug</Configuration>
6+ <Platform>Win32</Platform>
7+ </ProjectConfiguration>
8+ <ProjectConfiguration Include="Release|Win32">
9+ <Configuration>Release</Configuration>
10+ <Platform>Win32</Platform>
11+ </ProjectConfiguration>
12+ </ItemGroup>
13+ <PropertyGroup Label="Globals">
14+ <ProjectGuid>{67800DBE-C6A9-4E1A-A1DD-A40347489C22}</ProjectGuid>
15+ <RootNamespace>package</RootNamespace>
16+ </PropertyGroup>
17+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
18+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
19+ <ConfigurationType>Utility</ConfigurationType>
20+ <UseDebugLibraries>true</UseDebugLibraries>
21+ <CharacterSet>MultiByte</CharacterSet>
22+ </PropertyGroup>
23+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
24+ <ConfigurationType>Utility</ConfigurationType>
25+ <UseDebugLibraries>false</UseDebugLibraries>
26+ <WholeProgramOptimization>true</WholeProgramOptimization>
27+ <CharacterSet>MultiByte</CharacterSet>
28+ </PropertyGroup>
29+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
30+ <ImportGroup Label="ExtensionSettings">
31+ </ImportGroup>
32+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
33+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
34+ </ImportGroup>
35+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
36+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
37+ </ImportGroup>
38+ <PropertyGroup Label="UserMacros" />
39+ <PropertyGroup />
40+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
41+ <ClCompile>
42+ <WarningLevel>Level3</WarningLevel>
43+ <Optimization>Disabled</Optimization>
44+ </ClCompile>
45+ <Link>
46+ <GenerateDebugInformation>true</GenerateDebugInformation>
47+ </Link>
48+ </ItemDefinitionGroup>
49+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
50+ <ClCompile>
51+ <WarningLevel>Level3</WarningLevel>
52+ <Optimization>MaxSpeed</Optimization>
53+ <FunctionLevelLinking>true</FunctionLevelLinking>
54+ <IntrinsicFunctions>true</IntrinsicFunctions>
55+ </ClCompile>
56+ <Link>
57+ <GenerateDebugInformation>true</GenerateDebugInformation>
58+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
59+ <OptimizeReferences>true</OptimizeReferences>
60+ </Link>
61+ <PostBuildEvent>
62+ <Command>echo "出力先ディレクトリを消去します..."
63+rm -rf $(SolutionDir)\..\PackageFiles
64+
65+echo "出力先ディレクトリを生成します..."
66+mkdir $(SolutionDir)\..\PackageFiles
67+mkdir $(SolutionDir)\..\PackageFiles\doc
68+mkdir $(SolutionDir)\..\PackageFiles\src
69+mkdir $(SolutionDir)\..\PackageFiles\example
70+mkdir $(SolutionDir)\..\PackageFiles\bin
71+
72+echo "ソースコードをコピーします..."
73+copy $(SolutionDir)\*.c $(SolutionDir)\..\PackageFiles\src
74+copy $(SolutionDir)\*.h $(SolutionDir)\..\PackageFiles\src
75+copy $(SolutionDir)\*.vcxproj* $(SolutionDir)\..\PackageFiles\src
76+copy $(SolutionDir)\*.sln $(SolutionDir)\..\PackageFiles\src
77+copy $(SolutionDir)\Makefile $(SolutionDir)\..\PackageFiles\src
78+copy $(SolutionDir)\Doxyfile $(SolutionDir)\..\PackageFiles\src
79+
80+echo "ドキュメントをコピーします..."
81+copy $(SolutionDir)\..\doc\*.pdf $(SolutionDir)\..\PackageFiles\doc
82+copy $(SolutionDir)\..\doc\*.txt $(SolutionDir)\..\PackageFiles\doc
83+
84+echo "サンプルをコピーします..."
85+copy $(SolutionDir)\..\example\*.mot $(SolutionDir)\..\PackageFiles\example
86+
87+echo "バイナリをコピーします..."
88+copy $(SolutionDir)\Release\*.exe $(SolutionDir)\..\PackageFiles\bin</Command>
89+ </PostBuildEvent>
90+ </ItemDefinitionGroup>
91+ <ItemGroup>
92+ </ItemGroup>
93+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
94+ <ImportGroup Label="ExtensionTargets">
95+ </ImportGroup>
96+</Project>
\ No newline at end of file
--- /dev/null
+++ b/src/package.vcxproj.filters
@@ -0,0 +1,17 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+ <ItemGroup>
4+ <Filter Include="ソース ファイル">
5+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+ </Filter>
8+ <Filter Include="ヘッダー ファイル">
9+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+ </Filter>
12+ <Filter Include="リソース ファイル">
13+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+ </Filter>
16+ </ItemGroup>
17+</Project>
\ No newline at end of file
--- /dev/null
+++ b/src/package.vcxproj.user
@@ -0,0 +1,3 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+</Project>
\ No newline at end of file
Show on old repository browser