Skip to content

Commit ec90d79

Browse files
authored
Merge pull request #7553 from kamtom480/sdk2.6.0
spresense: update SDK to 2.6.0
2 parents 7071478 + 3fdebd4 commit ec90d79

File tree

5 files changed

+37
-8
lines changed

5 files changed

+37
-8
lines changed

ports/cxd56/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Bootloader information:
7575

7676
* You have to accept the End User License Agreement to be able to download and use the Spresense bootloader binary.
7777

78-
Download the spresense binaries zip archive from: [Spresense firmware v2-3-000](https://developer.sony.com/file/download/download-spresense-firmware-v2-3-000)
78+
Download the spresense binaries zip archive from: [Spresense firmware v2-4-000](https://developer.sony.com/file/download/download-spresense-firmware-v2-4-000)
7979

8080
Extract spresense binaries in your PC to ports/spresense/spresense-exported-sdk/firmware/
8181

ports/cxd56/common-hal/camera/Camera.c

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ typedef struct {
4747
uint16_t height;
4848
} image_size_t;
4949

50-
STATIC const image_size_t image_size_table[] = {
50+
STATIC const image_size_t isx012_image_size_table[] = {
5151
{ VIDEO_HSIZE_QVGA, VIDEO_VSIZE_QVGA },
5252
{ VIDEO_HSIZE_VGA, VIDEO_VSIZE_VGA },
5353
{ VIDEO_HSIZE_HD, VIDEO_VSIZE_HD },
@@ -57,12 +57,40 @@ STATIC const image_size_t image_size_table[] = {
5757
{ VIDEO_HSIZE_5M, VIDEO_VSIZE_5M },
5858
};
5959

60+
STATIC const image_size_t isx019_image_size_table[] = {
61+
{ VIDEO_HSIZE_QVGA, VIDEO_VSIZE_QVGA },
62+
{ VIDEO_HSIZE_VGA, VIDEO_VSIZE_VGA },
63+
{ VIDEO_HSIZE_HD, VIDEO_VSIZE_HD },
64+
{ VIDEO_HSIZE_QUADVGA, VIDEO_VSIZE_QUADVGA },
65+
};
66+
67+
static const char *get_imgsensor_name() {
68+
static struct v4l2_capability cap;
69+
70+
ioctl(camera_dev.fd, VIDIOC_QUERYCAP, (unsigned long)&cap);
71+
72+
return (const char *)cap.driver;
73+
}
74+
6075
static bool camera_check_width_and_height(uint16_t width, uint16_t height) {
61-
for (int i = 0; i < MP_ARRAY_SIZE(image_size_table); i++) {
62-
if (image_size_table[i].width == width && image_size_table[i].height == height) {
63-
return true;
76+
const char *sensor;
77+
78+
sensor = get_imgsensor_name();
79+
80+
if (strncmp(sensor, "ISX012", strlen("ISX012")) == 0) {
81+
for (int i = 0; i < MP_ARRAY_SIZE(isx012_image_size_table); i++) {
82+
if (isx012_image_size_table[i].width == width && isx012_image_size_table[i].height == height) {
83+
return true;
84+
}
85+
}
86+
} else if (strncmp(sensor, "ISX019", strlen("ISX019"))) {
87+
for (int i = 0; i < MP_ARRAY_SIZE(isx019_image_size_table); i++) {
88+
if (isx019_image_size_table[i].width == width && isx019_image_size_table[i].height == height) {
89+
return true;
90+
}
6491
}
6592
}
93+
6694
return false;
6795
}
6896

ports/cxd56/configs/circuitpython/defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,5 @@ CONFIG_USEC_PER_TICK=1000
113113
CONFIG_USERMAIN_STACKSIZE=8192
114114
CONFIG_USER_ENTRYPOINT="spresense_main"
115115
CONFIG_VIDEO_ISX012=y
116+
CONFIG_VIDEO_ISX019=y
116117
CONFIG_VIDEO_STREAM=y

ports/cxd56/spresense-exported-sdk

ports/cxd56/supervisor/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ bool port_has_fixed_stack(void) {
111111
uint32_t *port_stack_get_limit(void) {
112112
struct tcb_s *rtcb = this_task();
113113

114-
return rtcb->adj_stack_ptr - (uint32_t)rtcb->adj_stack_size;
114+
return rtcb->stack_base_ptr;
115115
}
116116

117117
uint32_t *port_stack_get_top(void) {
118118
struct tcb_s *rtcb = this_task();
119119

120-
return rtcb->adj_stack_ptr;
120+
return rtcb->stack_base_ptr + (uint32_t)rtcb->adj_stack_size;
121121
}
122122

123123
uint32_t *port_heap_get_bottom(void) {

0 commit comments

Comments
 (0)