Skip to content

Commit b521e71

Browse files
committed
Merge branch 'release-46'
2 parents c21f2ef + 8b45957 commit b521e71

File tree

172 files changed

+10153
-874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+10153
-874
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@ Change Log
33

44
This file contains the release notes (the major changes) since Circle Step30 for quick access. For earlier releases please checkout the respective git tag and look into README.md. More info is attached to the release tags (git cat-file tag StepNN) and is available in the git commit log.
55

6+
The 46th Step
7+
-------------
8+
9+
With this release Circle initially **supports the Raspberry Pi 5**. There are many features, which are not available yet, but important features like USB and networking are supported. Please see the [Circle documentation](https://circle-rpi.readthedocs.io/en/46.0/appendices/raspberry-pi-5.html) for more information on Raspberry Pi 5 support!
10+
11+
Circle comes with an **USB serial CDC gadget** now, which allows to communicate with a Circle application from a host computer via a serial interface without an USB serial adapter. This can be tested with the [test/usb-serial-cdc-gadget](test/usb-serial-cdc-gadget/).
12+
13+
The **properties file library** in [addon/Properties](addon/Properties/) supports section headers now.
14+
15+
A possible race condition in `CTimer` has been fixed, which could only occur with the KY-040 rotary encoder module driver.
16+
617
Release 45.3.1
718
--------------
819

20+
2023-10-08
21+
922
This is a hotfix release. It fixes the release of guard structures, which are used to protect static objects, which are defined inside of a function. This problem did occur only, when the system option `ARM_ALLOW_MULTI_CORE` was defined.
1023

1124
Release 45.3

CREDITS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Adding screen ANSI colors
8787
Providing info patch for I2S input
8888
Providing patch for WLAN AP mode
8989
Adding SMI master driver and WS2812OverSMI addon
90+
USB CDC ACM (serial) gadget driver
9091

9192
Maciej Sokolowski
9293
Adding WM8960 support to I2S sound driver
@@ -103,3 +104,10 @@ Adding support for Ctrl+navigation keys
103104

104105
@ArnoldUK
105106
Testing the resizing of the screen in different classes
107+
108+
@aniplay62
109+
Providing U-Boot driver for MACB / GEM Ethernet NIC for Raspberry Pi 5
110+
Helping to get WLAN working on Raspberry Pi 5
111+
112+
Joe Strout
113+
Providing Dvorak keyboard layout

Doxyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ HTML_COLORSTYLE_GAMMA = 80
11831183
# The default value is: NO.
11841184
# This tag requires that the tag GENERATE_HTML is set to YES.
11851185

1186-
HTML_TIMESTAMP = YES
1186+
#HTML_TIMESTAMP = YES
11871187

11881188
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
11891189
# documentation will contain a main index with vertical navigation menus that
@@ -1776,7 +1776,7 @@ LATEX_BIB_STYLE = plain
17761776
# The default value is: NO.
17771777
# This tag requires that the tag GENERATE_LATEX is set to YES.
17781778

1779-
LATEX_TIMESTAMP = NO
1779+
#LATEX_TIMESTAMP = NO
17801780

17811781
#---------------------------------------------------------------------------
17821782
# Configuration options related to the RTF output

README.md

Lines changed: 95 additions & 155 deletions
Large diffs are not rendered by default.

Rules.mk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Rules.mk
33
#
44
# Circle - A C++ bare metal environment for Raspberry Pi
5-
# Copyright (C) 2014-2023 R. Stange <rsta2@o2online.de>
5+
# Copyright (C) 2014-2024 R. Stange <rsta2@o2online.de>
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
1818
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919
#
2020

21-
CIRCLEVER = 450301
21+
CIRCLEVER = 460000
2222

2323
CIRCLEHOME ?= ..
2424

@@ -111,8 +111,12 @@ else ifeq ($(strip $(RASPPI)),4)
111111
ARCHCPU ?= -mcpu=cortex-a72 -mlittle-endian
112112
ARCH += -DAARCH=64 $(ARCHCPU)
113113
TARGET ?= kernel8-rpi4
114+
else ifeq ($(strip $(RASPPI)),5)
115+
ARCHCPU ?= -mcpu=cortex-a76 -mlittle-endian
116+
ARCH += -DAARCH=64 $(ARCHCPU)
117+
TARGET ?= kernel_2712
114118
else
115-
$(error RASPPI must be set to 3 or 4)
119+
$(error RASPPI must be set to 3, 4 or 5)
116120
endif
117121
PREFIX = $(PREFIX64)
118122
LOADADDR = 0x80000

addon/Properties/properties.cpp

Lines changed: 177 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// properties.cpp
33
//
44
// Circle - A C++ bare metal environment for Raspberry Pi
5-
// Copyright (C) 2016-2021 R. Stange <rsta2@o2online.de>
5+
// Copyright (C) 2016-2023 R. Stange <rsta2@o2online.de>
66
//
77
// This program is free software: you can redistribute it and/or modify
88
// it under the terms of the GNU General Public License as published by
@@ -18,18 +18,30 @@
1818
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1919
//
2020
#include <Properties/properties.h>
21+
#include <circle/ptrarray.h>
2122
#include <circle/util.h>
2223
#include <circle/logger.h>
2324
#include <assert.h>
2425

26+
struct TSection
27+
{
28+
CString Name;
29+
CPtrArray PropArray;
30+
};
31+
2532
struct TPropertyPair
2633
{
2734
char *pName;
2835
char *pValue;
2936
};
3037

38+
const char CProperties::DefaultSection[] = "";
39+
3140
CProperties::CProperties (void)
32-
: m_nGetIndex (0)
41+
: m_CurrentSectionName (DefaultSection),
42+
m_pCurrentSection (nullptr),
43+
m_pGetSection (nullptr),
44+
m_nGetIndex (0)
3345
{
3446
}
3547

@@ -38,6 +50,13 @@ CProperties::~CProperties (void)
3850
RemoveAll ();
3951
}
4052

53+
void CProperties::SelectSection (const char *pSectionName)
54+
{
55+
m_CurrentSectionName = pSectionName;
56+
57+
m_pCurrentSection = LookupSection (pSectionName);
58+
}
59+
4160
boolean CProperties::IsSet (const char *pPropertyName) const
4261
{
4362
return Lookup (pPropertyName) != 0;
@@ -214,20 +233,35 @@ void CProperties::SetIPAddress (const char *pPropertyName, const u8 *pAddress)
214233

215234
void CProperties::RemoveAll (void)
216235
{
217-
for (unsigned i = 0; i < m_PropArray.GetCount (); i++)
236+
TPtrListElement *pElement;
237+
while ((pElement = m_SectionList.GetFirst ()) != 0)
218238
{
219-
TPropertyPair *pProperty = (TPropertyPair *) m_PropArray[i];
220-
assert (pProperty != 0);
239+
TSection *pSection = (TSection *) m_SectionList.GetPtr (pElement);
240+
assert (pSection != 0);
241+
CPtrArray *pPropArray = &pSection->PropArray;
221242

222-
delete [] (char *) pProperty->pName;
223-
delete [] (char *) pProperty->pValue;
224-
delete pProperty;
225-
}
243+
for (unsigned i = 0; i < pPropArray->GetCount (); i++)
244+
{
245+
TPropertyPair *pProperty = (TPropertyPair *) (*pPropArray)[i];
246+
assert (pProperty != 0);
226247

227-
while (m_PropArray.GetCount () > 0)
228-
{
229-
m_PropArray.RemoveLast ();
248+
delete [] (char *) pProperty->pName;
249+
delete [] (char *) pProperty->pValue;
250+
delete pProperty;
251+
}
252+
253+
while (pPropArray->GetCount () > 0)
254+
{
255+
pPropArray->RemoveLast ();
256+
}
257+
258+
delete pSection;
259+
260+
m_SectionList.Remove (pElement);
230261
}
262+
263+
m_CurrentSectionName = DefaultSection;
264+
m_pCurrentSection = nullptr;
231265
}
232266

233267
void CProperties::AddProperty (const char*pPropertyName, const char *pValue)
@@ -252,27 +286,97 @@ void CProperties::AddProperty (const char*pPropertyName, const char *pValue)
252286
assert (pProperty->pValue != 0);
253287
strcpy (pProperty->pValue, pValue);
254288

255-
m_PropArray.Append (pProperty);
289+
if (m_pCurrentSection == 0)
290+
{
291+
m_pCurrentSection = new TSection;
292+
assert (m_pCurrentSection != 0);
293+
294+
m_pCurrentSection->Name = m_CurrentSectionName;
295+
296+
TPtrListElement *pElement = m_SectionList.GetFirst ();
297+
while (pElement != 0)
298+
{
299+
TPtrListElement *pNext = m_SectionList.GetNext (pElement);
300+
if (pNext == 0)
301+
{
302+
break;
303+
}
304+
305+
pElement = pNext;
306+
}
307+
308+
m_SectionList.InsertAfter (pElement, m_pCurrentSection);
309+
}
310+
311+
m_pCurrentSection->PropArray.Append (pProperty);
256312
}
257313

258314
boolean CProperties::GetFirst (void)
259315
{
316+
m_pGetSection = m_SectionList.GetFirst ();
260317
m_nGetIndex = 0;
261318

262-
return m_PropArray.GetCount () > m_nGetIndex;
319+
if (m_pGetSection == 0)
320+
{
321+
m_CurrentSectionName = DefaultSection;
322+
323+
return FALSE;
324+
}
325+
326+
TSection *pSection = (TSection *) m_SectionList.GetPtr (m_pGetSection);
327+
assert (pSection != 0);
328+
329+
m_CurrentSectionName = pSection->Name;
330+
331+
return pSection->PropArray.GetCount () > m_nGetIndex;
263332
}
264333

265334
boolean CProperties::GetNext (void)
266335
{
267336
m_nGetIndex++;
268337

269-
return m_PropArray.GetCount () > m_nGetIndex;
338+
assert (m_pGetSection != 0);
339+
TSection *pSection = (TSection *) m_SectionList.GetPtr (m_pGetSection);
340+
assert (pSection != 0);
341+
342+
if (pSection->PropArray.GetCount () > m_nGetIndex)
343+
{
344+
return TRUE;
345+
}
346+
347+
m_pGetSection = m_SectionList.GetNext (m_pGetSection);
348+
if (m_pGetSection == 0)
349+
{
350+
m_CurrentSectionName = DefaultSection;
351+
m_pCurrentSection = LookupSection (m_CurrentSectionName);
352+
353+
return FALSE;
354+
}
355+
356+
pSection = (TSection *) m_SectionList.GetPtr (m_pGetSection);
357+
assert (pSection != 0);
358+
359+
m_CurrentSectionName = pSection->Name;
360+
m_pCurrentSection = pSection;
361+
362+
m_nGetIndex = 0;
363+
364+
return TRUE;
365+
}
366+
367+
const char *CProperties::GetSectionName (void) const
368+
{
369+
return m_CurrentSectionName;
270370
}
271371

272372
const char *CProperties::GetName (void) const
273373
{
274-
assert (m_nGetIndex < m_PropArray.GetCount ());
275-
TPropertyPair *pProperty = (TPropertyPair *) m_PropArray[m_nGetIndex];
374+
assert (m_pGetSection != 0);
375+
TSection *pSection = (TSection *) m_SectionList.GetPtr (m_pGetSection);
376+
assert (pSection != 0);
377+
378+
assert (m_nGetIndex < pSection->PropArray.GetCount ());
379+
TPropertyPair *pProperty = (TPropertyPair *) pSection->PropArray[m_nGetIndex];
276380
assert (pProperty != 0);
277381
assert (pProperty->pName != 0);
278382

@@ -281,19 +385,50 @@ const char *CProperties::GetName (void) const
281385

282386
const char *CProperties::GetValue (void) const
283387
{
284-
assert (m_nGetIndex < m_PropArray.GetCount ());
285-
TPropertyPair *pProperty = (TPropertyPair *) m_PropArray[m_nGetIndex];
388+
assert (m_pGetSection != 0);
389+
TSection *pSection = (TSection *) m_SectionList.GetPtr (m_pGetSection);
390+
assert (pSection != 0);
391+
392+
assert (m_nGetIndex < pSection->PropArray.GetCount ());
393+
TPropertyPair *pProperty = (TPropertyPair *) pSection->PropArray[m_nGetIndex];
286394
assert (pProperty != 0);
287395
assert (pProperty->pValue != 0);
288396

289397
return pProperty->pValue;
290398
}
291399

400+
TSection *CProperties::LookupSection (const char*pSectionName) const
401+
{
402+
assert (pSectionName != 0);
403+
404+
TPtrListElement *pElement = m_SectionList.GetFirst ();
405+
while (pElement != 0)
406+
{
407+
TSection *pSection = (TSection *) m_SectionList.GetPtr (pElement);
408+
assert (pSection != 0);
409+
410+
if (pSection->Name.Compare (pSectionName) == 0)
411+
{
412+
return pSection;
413+
}
414+
415+
pElement = m_SectionList.GetNext (pElement);
416+
}
417+
418+
return 0;
419+
}
420+
421+
292422
TPropertyPair *CProperties::Lookup (const char*pPropertyName) const
293423
{
294-
for (unsigned i = 0; i < m_PropArray.GetCount (); i++)
424+
if (m_pCurrentSection == 0)
295425
{
296-
TPropertyPair *pProperty = (TPropertyPair *) m_PropArray[i];
426+
return 0;
427+
}
428+
429+
for (unsigned i = 0; i < m_pCurrentSection->PropArray.GetCount (); i++)
430+
{
431+
TPropertyPair *pProperty = (TPropertyPair *) m_pCurrentSection->PropArray[i];
297432
assert (pProperty != 0);
298433
if (strcmp (pProperty->pName, pPropertyName) == 0)
299434
{
@@ -308,14 +443,30 @@ TPropertyPair *CProperties::Lookup (const char*pPropertyName) const
308443

309444
void CProperties::Dump (const char *pSource) const
310445
{
311-
CLogger::Get ()->Write (pSource, LogDebug, "Dumping %u properties:", m_PropArray.GetCount ());
446+
CLogger::Get ()->Write (pSource, LogDebug, "Dumping properties:");
312447

313-
for (unsigned i = 0; i < m_PropArray.GetCount (); i++)
448+
TPtrListElement *pElement = m_SectionList.GetFirst ();
449+
while (pElement != 0)
314450
{
315-
TPropertyPair *pProperty = (TPropertyPair *) m_PropArray[i];
316-
assert (pProperty != 0);
451+
TSection *pSection = (TSection *) m_SectionList.GetPtr (pElement);
452+
assert (pSection != 0);
453+
454+
if (pSection->Name.Compare (DefaultSection) != 0)
455+
{
456+
CLogger::Get ()->Write (pSource, LogDebug, "[%s]",
457+
static_cast<const char *> (pSection->Name));
458+
}
459+
460+
for (unsigned i = 0; i < pSection->PropArray.GetCount (); i++)
461+
{
462+
TPropertyPair *pProperty = (TPropertyPair *) pSection->PropArray[i];
463+
assert (pProperty != 0);
464+
465+
CLogger::Get ()->Write (pSource, LogDebug, "%s=%s",
466+
pProperty->pName, pProperty->pValue);
467+
}
317468

318-
CLogger::Get ()->Write (pSource, LogDebug, "%s=%s", pProperty->pName, pProperty->pValue);
469+
pElement = m_SectionList.GetNext (pElement);
319470
}
320471
}
321472

0 commit comments

Comments
 (0)