Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
e4be56a0
Commit
e4be56a0
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
qemu-arm: Enable machine module and associated tests.
parent
4f3c1b3f
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
qemu-arm/Makefile
+2
-0
2 additions, 0 deletions
qemu-arm/Makefile
qemu-arm/modmachine.c
+47
-0
47 additions, 0 deletions
qemu-arm/modmachine.c
qemu-arm/mpconfigport.h
+4
-0
4 additions, 0 deletions
qemu-arm/mpconfigport.h
tools/tinytest-codegen.py
+0
-1
0 additions, 1 deletion
tools/tinytest-codegen.py
with
53 additions
and
1 deletion
qemu-arm/Makefile
+
2
−
0
View file @
e4be56a0
...
...
@@ -36,9 +36,11 @@ LDFLAGS= --specs=nano.specs --specs=rdimon.specs -Wl,--gc-sections -Wl,-Map=$(@:
SRC_C
=
\
main.c
\
modmachine.c
\
SRC_TEST_C
=
\
test_main.c
\
modmachine.c
\
LIB_SRC_C
=
$(
addprefix lib/,
\
libm/math.c
\
...
...
This diff is collapsed.
Click to expand it.
qemu-arm/modmachine.c
0 → 100644
+
47
−
0
View file @
e4be56a0
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include
"extmod/machine_mem.h"
#include
"extmod/machine_pinbase.h"
#include
"extmod/machine_signal.h"
STATIC
const
mp_rom_map_elem_t
machine_module_globals_table
[]
=
{
{
MP_ROM_QSTR
(
MP_QSTR___name__
),
MP_ROM_QSTR
(
MP_QSTR_umachine
)
},
{
MP_ROM_QSTR
(
MP_QSTR_mem8
),
MP_ROM_PTR
(
&
machine_mem8_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_mem16
),
MP_ROM_PTR
(
&
machine_mem16_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_mem32
),
MP_ROM_PTR
(
&
machine_mem32_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_PinBase
),
MP_ROM_PTR
(
&
machine_pinbase_type
)
},
{
MP_ROM_QSTR
(
MP_QSTR_Signal
),
MP_ROM_PTR
(
&
machine_signal_type
)
},
};
STATIC
MP_DEFINE_CONST_DICT
(
machine_module_globals
,
machine_module_globals_table
);
const
mp_obj_module_t
mp_module_machine
=
{
.
base
=
{
&
mp_type_module
},
.
globals
=
(
mp_obj_dict_t
*
)
&
machine_module_globals
,
};
This diff is collapsed.
Click to expand it.
qemu-arm/mpconfigport.h
+
4
−
0
View file @
e4be56a0
...
...
@@ -33,6 +33,7 @@
#define MICROPY_PY_URE (1)
#define MICROPY_PY_UHEAPQ (1)
#define MICROPY_PY_UHASHLIB (1)
#define MICROPY_PY_MACHINE (1)
#define MICROPY_USE_INTERNAL_PRINTF (0)
// type definitions for the specific machine
...
...
@@ -57,5 +58,8 @@ typedef long mp_off_t;
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
#define MICROPY_PORT_BUILTIN_MODULES \
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \
// We need to provide a declaration/definition of alloca()
#include
<alloca.h>
This diff is collapsed.
Click to expand it.
tools/tinytest-codegen.py
+
0
−
1
View file @
e4be56a0
...
...
@@ -51,7 +51,6 @@ exclude_tests = (
'
float/float2int_doubleprec.py
'
,
# requires double precision floating point to work
'
inlineasm/asmfpaddsub.py
'
,
'
inlineasm/asmfpcmp.py
'
,
'
inlineasm/asmfpldrstr.py
'
,
'
inlineasm/asmfpmuldiv.py
'
,
'
inlineasm/asmfpsqrt.py
'
,
'
extmod/ticks_diff.py
'
,
'
extmod/time_ms_us.py
'
,
'
extmod/uheapq_timeq.py
'
,
'
extmod/machine_pinbase.py
'
,
'
extmod/machine_pulse.py
'
,
'
extmod/vfs_fat_ramdisk.py
'
,
'
extmod/vfs_fat_fileio.py
'
,
'
extmod/vfs_fat_fsusermount.py
'
,
'
extmod/vfs_fat_oldproto.py
'
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment